Last active
January 27, 2016 11:03
-
-
Save PEKTOP/b201f7254a7e9a7694b4 to your computer and use it in GitHub Desktop.
A Cheat Sheet
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
POSTGRESQL | |
$ sudo su postgres -c psql postgres | |
postgres=# ALTER USER postgres WITH PASSWORD 'password'; | |
postgres=# \q | |
$ sudo passwd -d postgres | |
$ sudo su postgres -c passwd | |
$ adduser tom | |
$ sudo su postgres -c psql postgres | |
postgres=# CREATE USER tom WITH PASSWORD 'myPassword'; | |
postgres=# CREATE DATABASE jerry; | |
postgres=# GRANT ALL PRIVILEGES ON DATABASE jerry to tom; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment