postgres
passwordpostgres
password:
postgres
password
postgres
user:
postgres
database user password:
postgres
user:
g_hba.conf
:
md5
means that you need to provide a password to connect to PostgreSQL. Use trust
to connect without providing a password.postgresql.conf
:
postgres
user otherwise you might get an error if your run psql
command:
postgres
user:
psql
command:
psql
:
psql
to connect to a remote host:
psql
to connect to a remote host (provide password in the command line):
psql
to connect to a remote host (provide password using the ~/.pgpass file):
psql
to run a query on a remote host:
psql
command and execute the command CREATE ROLE
to create a new role:
ALTER ROLE
to assign permission to a user:
drop user
to delete a user:
psql
command and execute the command CREATE DATABASE
to create a new database:
psql
command and execute the command GRANT ALL
to grant privileges on a database:
drop database
to delete a database:
pg_dump
tool to backup a database:
psql
to restore a database:
postgresql.conf
:
pg_hba.conf
" and "postgresql.conf
" as seen above./etc/postgresql/9.6/main