Lov*_*eow 43 postgresql macos homebrew
我用自制软件安装了postgres.我想找到他的文件pg_hba.conf和postgresql.conf但我找不到它们.
我跟着这个:
https://askubuntu.com/questions/256534/how-do-i-find-the-path-to-pg-hba-conf-from-the-shell
还有这个
http://www.kelvinwong.ca/tag/pg_hba-conf/
但我还是找不到它.
Doo*_*oon 94
默认情况下,自制软件将所有内容都放入 /usr/local
所以postgresql配置文件将是 /usr/local/var/postgres/
cot*_*ros 12
无论您的操作系统是什么,您始终可以使用该psql实用程序、DBeaver 或任何其他客户端工具,并键入 SQLshow命令来查看任何运行时设置的值。
例如,在我的 BigSur OSX 系统上,我使用 EDB 安装程序安装了 PostgreSQL v13,这些是使用该实用程序的位置postgresql.conf和pg_hba.conf文件psql:
psql -U postgres -c 'show config_file'
Password for user postgres:
config_file
---------------------------------------------
/Library/PostgreSQL/13/data/postgresql.conf
(1 row)
Run Code Online (Sandbox Code Playgroud)
psql -U postgres -c 'show hba_file'
Password for user postgres:
hba_file
-----------------------------------------
/Library/PostgreSQL/13/data/pg_hba.conf
(1 row)
Run Code Online (Sandbox Code Playgroud)
小智 8
这可能是查找 postgresql.conf/pg_hba.conf 文件的可能位置
/opt/homebrew/var/postgres/postgresql.conf
/opt/homebrew/var/postgres/pg_hba.conf
Run Code Online (Sandbox Code Playgroud)
最坏的情况,您可以搜索它:
find / -type f -name pg_hba.conf 2> /dev/null
Run Code Online (Sandbox Code Playgroud)
可以使用 pg admin https://dba.stackexchange.com/questions/61193/how-to-edit-postgresql-conf-with-pgadmin 在不知道它们位置的情况下编辑这些文件
- 编辑 postgresql.conf 文件:选择
Tools>Server Configuration>postgresql.conf- 要编辑pg_hba.conf文件:选择
Tools>Server Configuration>pg_hba.conf
| 归档时间: |
|
| 查看次数: |
33606 次 |
| 最近记录: |