- Install PostgreSQL on Ubuntu 16.04
- Create User and Database in PostgreSQL
- PostgreSQL FATAL: Peer authentication failed for user “USER_NAME”
- Restore PostgreSQL Database
- PostgreSQL DESCRIBE TABLE
- psql
Create A User
To create user in PostgreSQL, run
sudo -u postgres -i createuser -s <username> exit
Change User Password
sudo -u postgres -i psql ALTER USER USER-NAME-HERE WITH PASSWORD 'PASSWORD-HERE'; \q exit
OR
root@maps:~# sudo -u postgres -i postgres@maps:~$ psql psql (9.3.10) Type "help" for help. postgres-# \password USER-NAME-HERE Enter new password: Enter it again: postgres-#