Skip to content

Instantly share code, notes, and snippets.

@hosamshahin
Last active November 27, 2018 16:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hosamshahin/cfd4378026a4b4bbdc1cbf3d763051ce to your computer and use it in GitHub Desktop.
Save hosamshahin/cfd4378026a4b4bbdc1cbf3d763051ce to your computer and use it in GitHub Desktop.
sudo su - postgres
createdb database_name
psql -s database_name
create user database_name password 'database_name';
GRANT ALL PRIVILEGES ON DATABASE database_name TO database_name;
dropdb database_name
# stop postgress process and release port 5432 on Mac
brew services stop postgresql
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment