SonarQube

PostgreSQL允许远程登录

2020-07-25  本文已影响0人  戈壁堂

Connecting to a Remote PostgreSQL Database

默认,PostgreSQL只监听本地连接,不允许远程通过TCP/IP链接,运行远程连接需要在Server端修改两个配置文件;postgresql.confpg_hba.conf文件。

这两个配置文件的位置可以在数据库中使用postgres用户通过以下sql进行查询:

postgres=# show config_file;
              config_file
----------------------------------------
 /var/lib/pgsql/10/data/postgresql.conf
(1 row)

postgres=# show hba_file;
              hba_file
------------------------------------
 /var/lib/pgsql/10/data/pg_hba.conf
(1 row)

postgres=#

上一篇 下一篇

猜你喜欢

热点阅读