18 lines
247 B
Plaintext
Executable File
18 lines
247 B
Plaintext
Executable File
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;
|