Add linux notes

This commit is contained in:
2022-05-06 00:50:43 +03:00
parent ec0feb6324
commit 8491309c9d
4 changed files with 43 additions and 0 deletions

17
linux/postgres_commands.txt Executable file
View File

@@ -0,0 +1,17 @@
Start:
su postgres
psql
Show databases:
\l
Switch to database:
\c [name]
Show tables
\dt
Create new database and user:
create database mydb;
create user myuser with encrypted password 'mypass';
grant all privileges on database mydb to myuser;