Skip to content

Instantly share code, notes, and snippets.

@the-teacher
Last active October 25, 2015 11:05
Show Gist options
  • Save the-teacher/581cd845a4fc8ed45d4b to your computer and use it in GitHub Desktop.
Save the-teacher/581cd845a4fc8ed45d4b to your computer and use it in GitHub Desktop.
passwd root
passwd rails
su - postgres
createdb -E UTF8 -O rails qoob_backend_prod
createdb -E UTF8 -O rails qoob_backend_stage
psql
GRANT ALL PRIVILEGES ON DATABASE qoob_backend_prod TO rails;
GRANT ALL PRIVILEGES ON DATABASE qoob_backend_stage TO rails;
ALTER USER rails WITH PASSWORD 'PASSWORD';
\du
@the-teacher
Copy link
Author

su - postgres
psql
createdb -E UTF8 -O rails qoob_backend_production
psql
ALTER USER rails WITH CREATEDB;
GRANT ALL PRIVILEGES ON DATABASE qoob_backend_production TO rails;
\du
\q

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment