Q: While connecting to the PostgreSQL datasource, why did I fail if I set server name to the IP of the database server? If I left it blank, it would be successful.
A: The client connection failed because you had not given the server IP permission. You need to grant the permission to IP so that the IP address can work as 127.0.0.1. In the pg_hba.conf file under the data folder of the PostgreSQL database installation directory, please add “host all all 0.0.0.0/0 md5” after “host all all 127.0.0.1/32 md5”.