![]() Postgres=# select * from pg_stat_activity where datname='dbname' To display the list of database connections: ![]() Postgres=# GRANT ALL PRIVILEGES ON DATABASE newdbtest TO mydbuser Postgres=# CREATE USER mydbuser WITH password '!123456789' Then we’ll show some simple examples of PostgreSQL management from psql console.Ĭhange the default postgres user password:ĪLTER ROLE postgres WITH PASSWORD 's3tPa$$w0rd!' Ĭreate a new database and user, and grant the user full access to the new database: # firewall-cmd -zone=public -add-port=5432/tcp -permanent ![]() If you want to access to PostgreSQL from the outside, open the TCP Port 5432 in the default CentOS firewalld: Oct 18 16:02:16 systemd: Starting PostgreSQL 11 database server. └─8728 postgres: logical replication launcher Process: 8714 ExecStartPre=/usr/pgsql-11/bin/postgresql-11-check-db-dir $ (code=exited, status=0/SUCCESS)ĬGroup: /system.slice/rvice Loaded: loaded (/usr/lib/systemd/system/rvice enabled vendor preset: disabled)Īctive: active (running) since Wed 16:02:15 +06 26s ago Also, enable the PostgreSQL daemon and add it to auto-start using systemctl:
0 Comments
Leave a Reply. |