首页 > 数据库 > PostgreSQL > pg 连接报错
pg 连接报错
nan@nanMac var-13 % psql -h 192.168.11.1 -p 5432 -d nan
psql: error: FATAL: no pg_hba.conf entry for host "192.168.11.1", user "nan", database "nan", SSL off
添加访问策略。
nan@nanMac var-13 % vi pg_hba.conf
host replication all 127.0.0.1/32 trust
host replication all ::1/128 trust
host all all 192.168.11.1/24 trust
问题解决
nan@nanMac var-13 % psql -h 192.168.11.1 -p 5432 -d nan
psql (13.3)
Type "help" for help.
nan=# exit
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/31519308/viewspace-2777823/ ,如需转载,请注明出处,否则将追究法律责任。