how to change postgresql listening port in windows

2019-02-01 22:41发布

How do i change the default listening port 5432 of postgresql to another number?

Another question,

What steps do i have do to allow remote r/w access to the database using python pyscopg2?

1条回答
戒情不戒烟
2楼-- · 2019-02-01 23:12

Just change the setting in the file postgresql.conf (can be found in the data directory):

port = 5433             # (change requires restart)

Remote access can be given by changing pg_hba.conf, just add the ip-address. You also have to edit postgresql.conf:

listen_addresses = '*'
查看更多
登录 后发表回答