Difference between revisions of "PostgreSQL"

From Briki
Jump to: navigation, search
(Creating a DB)
(PostgresSQL)
Line 2: Line 2:
  
 
=== Creating a DB ===
 
=== Creating a DB ===
   sudo su - postgres
+
   sudo -u postgres createdb <dbname>
   createdb <dbname>
+
 
 +
=== Creating a user ===
 +
  sudo -u postgres createuser <username>
 +
 
 +
=== Starting an interactive session ===
 +
   psql <dbname>

Revision as of 11:08, 7 February 2020

PostgresSQL

Creating a DB

 sudo -u postgres createdb <dbname>

Creating a user

 sudo -u postgres createuser <username>

Starting an interactive session

 psql <dbname>