Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Access Postgres :
- sudo -i -u postgres
- psql
- Create New User:
- Step 1 :
- createuser --interactive <usrer-name>
- createdb <database-name>
- Setp 2 :
- postgres@hostname:~$ psql
- postgres=# alter user username with encrypted password 'password';
- ALTER ROLE
- postgres=# grant all privileges on database databasename to username;1
- GRANT
- Setp 3:
- Open File /etc/postgresql/9.3/main/pg_hba.conf
- Replace "host all all 127.0.0.1/32 trust" to "host all all 0.0.0.0/0 trust"
- Open File /etc/postgresql/9.3/main/postgresql.conf
- uncomment "listen_addresses = '*'"
- Setp 4:
- sudo service postgres restart
Add Comment
Please, Sign In to add comment