Last active
March 18, 2019 14:48
-
-
Save fbatiga/2630d66abb15b2c124218c943200c161 to your computer and use it in GitHub Desktop.
Login into Postgresql
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 -i -u postgres | |
| psql | |
| CREATE DATABASE "db_name"; | |
| CREATE USER "your_user" WITH ENCRYPTED PASSWORD 'XXXXXXXX'; | |
| GRANT ALL PRIVILEGES ON DATABASE "db_name" TO "your_user"; | |
| GRANT ALL PRIVILEGES ON ALL TABLES IN SCHEMA public TO "your_user"; | |
| GRANT ALL PRIVILEGES ON ALL SEQUENCES IN SCHEMA public TO "your_user"; | |
| GRANT ALL PRIVILEGES ON ALL FUNCTIONS IN SCHEMA public TO "your_user"; | |
| ALTER DATABASE db_name OWNER TO your_user; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment