我最近在Ubuntu上安装了PostgreSQL和EnterpriseDB包。我可以连接到本地数据库,但我不能配置它,因为我找不到配置文件。我搜索了整个硬盘驱动器,只找到了像pg_hba.conf.sample这样的样本
PostgreSQL .conf文件在哪里?
我最近在Ubuntu上安装了PostgreSQL和EnterpriseDB包。我可以连接到本地数据库,但我不能配置它,因为我找不到配置文件。我搜索了整个硬盘驱动器,只找到了像pg_hba.conf.sample这样的样本
PostgreSQL .conf文件在哪里?
当前回答
对于ubuntu 18/20,执行以下命令找到postgresql.conf文件:
locate postgresql.conf
如果你的linux中没有locate,那么先运行sudo apt-get install locate来安装locate。
其他回答
Run
sudo updatedb
紧随其后的是
locate postgresql.conf
我的安装不是默认的,但你可以去Postgres目录,找到子目录\Data。
配置文件 C: \ Postgres \ \ postgresql.conf数据 C: \ Postgres \ \ pg_hba.conf数据
The 30-07-2019
在Windows 10 pro中:
C:\Program Files\PostgreSQL\11\data
在Mac上(使用brew安装Postgres):
/usr/local/Cellar/postgresql/9.3.3>bin/postgres -D /usr/local/var/postgres/
2022-4-25更新:
地点:/ Library / PostgreSQL / 14 /数据/ postgresql.conf
系统:MacOS Monterey
只是给那些正在寻找这条道路的人……