Sometimes we need to log in to the PostgreSQL client. After we log in, it prompted an error Access to database denied. We can find the solution by reading the alarm prompt.
Access to database denied.
1. Switch the user
su – postgres
2. Edit the configuration file and grant rights to the client network
Add host all all 192.168.0.0/24 md5 to the last row.
Here we imagine 192.168.0.0/24 is the network segment of client
3. Restart the PostgreSQL database
su – root
./service.sh restart pgdb
The pgAdmin client is not at the same network segment with signaling IP. We need to grant primary access to the client.