更改 pgsql 端口

编程入门 行业动态 更新时间:2024-10-26 13:27:45
本文介绍了更改 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 端口

本文发布于:2023-08-07 19:41:13,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1321375.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:端口   pgsql

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!