Skip to content

Instantly share code, notes, and snippets.

@sbeam
Created September 7, 2011 15:34
Show Gist options
  • Select an option

  • Save sbeam/1200891 to your computer and use it in GitHub Desktop.

Select an option

Save sbeam/1200891 to your computer and use it in GitHub Desktop.
create postgres DBs for Rails proj, OSX
sbeam@pris ~/Sites/parallaxp]$ psql -U postgres -c "CREATE DATABASE parallaxp_dev"
Password for user postgres:
CREATE DATABASE
sbeam@pris ~/Sites/parallaxp]$ psql -U postgres -c "CREATE USER parallaxp WITH PASSWORD 'xxxxxxxxxx'"
Password for user postgres:
CREATE ROLE
sbeam@pris ~/Sites/parallaxp]$ psql -U postgres -c "CREATE DATABASE parallaxp_test OWNER parallaxp"
Password for user postgres:
CREATE DATABASE
sbeam@pris ~/Sites/parallaxp]$ psql -U postgres -c "ALTER USER parallaxp CREATEDB"
Password for user postgres:
ALTER ROLE
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment