Skip to content

Instantly share code, notes, and snippets.

@sanjaykrishnan
Created September 25, 2018 04:42
Show Gist options
  • Save sanjaykrishnan/355f4786d374745dd73b4c0cfabcedd7 to your computer and use it in GitHub Desktop.
Save sanjaykrishnan/355f4786d374745dd73b4c0cfabcedd7 to your computer and use it in GitHub Desktop.
Common postgres commands
sudo -su postgres
psql
create database wynvent;
CREATE USER myuser WITH PASSWORD 'password';
GRANT ALL PRIVILEGES ON DATABASE "wynvent" to myuser;
ALTER USER myuser WITH SUPERUSER;
#quit psql shell
\q
#list all databases
\l
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment