更改 pgsql 端口 [英] change pgsql port
本文介绍了更改 pgsql 端口的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我目前有一个在端口 1486
上运行的已安装 pgsql 实例.我想把这个端口改成5433
,我该怎么做?
I have currently an installed pgsql instance that is running on port 1486
. I want to change this port to 5433
, how should I proceed for this?
推荐答案
postgresql.conf
文件中应该有一行内容是:
There should be a line in your postgresql.conf
file that says:
port = 1486
改变它.
文件的位置可能因您的安装选项而异.在基于 Debian 的发行版上,它是 /etc/postgresql/8.3/main/
The location of the file can vary depending on your install options. On Debian-based distros it is /etc/postgresql/8.3/main/
在 Windows 上是 C:\Program Files\PostgreSQL\9.3\data
On Windows it is C:\Program Files\PostgreSQL\9.3\data
不要忘记 sudo service postgresql restart
以使更改生效.
Don't forget to sudo service postgresql restart
for changes to take effect.
这篇关于更改 pgsql 端口的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文