首页 > 数据库 > > 连接数据库-配置服务端远程连接
进行远程连接前,需要在所有部署了CN的机器上设置允许客户端访问数据库,并配置远程连接。
以下步骤需要在集群的每个CN所在主机上执行。
gs_guc check -Z coordinator -I all -c "listen_addresses"查询到的信息类似如下:
expected guc information: plat1: listen_addresses=NULL: [/gaussdb/data/data_cn/postgresql.conf]
gs_guc check: plat1: listen_addresses='localhost, 192.168.0.100': [/gaussdb/data/data_cn/postgresql.conf]
Total GUC values: 1. Failed GUC values: 0.
The value of parameter listen_addresses is same on all instances.
listen_addresses='localhost, 192.168.0.100'
gs_guc set -I all -Z coordinator -c "listen_addresses='localhost,192.168.0.100,10.11.12.13'"执行如下命令重启集群。
gs_om -t stop && gs_om -t start
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/69959250/viewspace-3145470/ ,如需转载,请注明出处,否则将追究法律责任。