Last active
September 7, 2017 08:33
-
-
Save svfat/5f312089da90ae49372c to your computer and use it in GitHub Desktop.
postgresql create new db
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo su - postgres | |
psql | |
CREATE DATABASE myproject; | |
CREATE USER myproject WITH PASSWORD 'myproject'; | |
ALTER ROLE myproject SET client_encoding TO 'utf8'; | |
ALTER ROLE myproject SET default_transaction_isolation TO 'read committed'; | |
ALTER ROLE myproject SET timezone TO 'UTC'; | |
ALTER ROLE myproject CREATEDB; | |
GRANT ALL PRIVILEGES ON DATABASE myproject TO myproject; | |
\q | |
exit |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment