客户端连接PG,报如下错误:
[root@lisdb1 odbc]# isql PGYWGL -v
[08001][unixODBC]connection to server at "10.16.105.239", port 5432 failed: : û10.16.104.1", "HIS", dhhp_7000", no encryption g_hba.conf
这个错误,一般是 pg_hba.conf配置中,没有放开对外的访问,加上以下行:
...
host all all 0.0.0.0/0 md5
...
然后,再重启一下pg,或者select pg_reload_conf();也行。
之后,再去访问,即可
[root@lisdb1 ~]# isql PGYWGL -v
+---------------------------------------+
| Connected! |
| |
| sql-statement |
| help [tablename] |
| quit |
| |
+---------------------------------------+
SQL>
|