导航到以下位置C:\Program Files\PostgreSQL\14\data
postgresql.conf
文件:
检查listen_addresses
是=*
(在某些postgres版本中默认为localhost)如果不是,则必须将其更改为*
. 它用于监听所有接口。
pg_hba.conf
文件:
添加新行:
host all all 0.0.0.0/0 md5
重新连接,正常运行
导航到以下位置C:\Program Files\PostgreSQL\14\data
postgresql.conf
文件:
检查listen_addresses
是=*
(在某些postgres版本中默认为localhost)如果不是,则必须将其更改为*
. 它用于监听所有接口。
pg_hba.conf
文件:
添加新行:
host all all 0.0.0.0/0 md5
重新连接,正常运行