PostgreSQL

Works with my version of PostgreSQL.

Log in (source):

sudo -u postgres psql

Quit (source):

\q

Source.

sudo -u postgres createuser <username>
sudo -u postgres createdb <dbname>

Within postgres:

alter user <username> with encrypted password '<password>';
grant all privileges on database <dbname> to <username>;

Once logged in psql prompt (https://stackoverflow.com/a/23990410):

\l+
sudo systemctl restart postgresql

restart can be replaced by stop or start.

Enter your comment. Wiki syntax is allowed:
If you can't read the letters on the image, download this .wav file to get them read to you.
 
  • Last modified: 11 months ago
  • by Olivier Simard-Casanova