文章目录 1、连接PostgreSQL2、修改pg_hba.conf3、修改postgresql.conf 1、连接PostgreSQL 这步不是必须的,这是测试是否能连上 psql -U username -h hostname -p port -d dbname 2、修改pg_hba.conf 将host这行改成 0.0.0.0/0 3、修改postgresql.conf 将listen_addresses = “localhost” 改成listen_addresses = “*”