重庆思庄Oracle、KingBase、PostgreSQL、Redhat认证学习论坛

 找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 14656|回复: 1
打印 上一主题 下一主题

南大通用 gbase8c 允许客户端登陆

[复制链接]
跳转到指定楼层
楼主
发表于 2025-12-10 19:35:06 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
在 gha服务器上执行报错:

[gbase@node1 ~]$ gsql -d postgres -Ugbase -h 192.168.133.42  -p 5432 -Wgbase
gsql: FATAL:  Forbid remote connection with trust method!
FATAL:  Forbid remote connection with trust method!

在CN上执行以下语句:

[gbase@node2 cn1]$ gs_guc set -Z coordinator -N all -I all -h "host all all 0.0.0.0/0 sha256"
The gs_guc run with the following arguments: [gs_guc -Z coordinator -N all -I all -h host all all 0.0.0.0/0 sha256 set ].
Begin to perform the total nodes: 3.
Popen count is 2, Popen success count is 2, Popen failure count is 0.
Begin to perform gs_guc for coordinators.
Command count is 2, Command success count is 2, Command failure count is 0.

Total instances: 2.
ALL: Success to perform gs_guc!


[gbase@node2 cn1]$
[gbase@node2 cn1]$
[gbase@node2 cn1]$ gs_guc set -Z coordinator -N all -I all -c "password_encryption_type=1"
The gs_guc run with the following arguments: [gs_guc -Z coordinator -N all -I all -c password_encryption_type=1 set ].
Begin to perform the total nodes: 3.
Popen count is 2, Popen success count is 2, Popen failure count is 0.
Begin to perform gs_guc for coordinators.
Command count is 2, Command success count is 2, Command failure count is 0.

Total instances: 2.
ALL: Success to perform gs_guc!


[gbase@node2 cn1]$ gs_guc set -Z coordinator -N all -I all -c "listen_addresses='*'"
The gs_guc run with the following arguments: [gs_guc -Z coordinator -N all -I all -c listen_addresses='*' set ].
Begin to perform the total nodes: 3.
Popen count is 2, Popen success count is 2, Popen failure count is 0.
Begin to perform gs_guc for coordinators.
Command count is 2, Command success count is 2, Command failure count is 0.

Total instances: 2.
ALL: Success to perform gs_guc!


[gbase@node2 cn1]$

再使用这个用户登陆

[gbase@node1 ~]$ gsql -d postgres -Ugbase -h 192.168.133.42  -p 5432
gsql: FATAL:  Forbid remote connection with initial user.
FATAL:  Forbid remote connection with initial user.

这时,提示初始用户无法登陆,创建一个用户

postgres=# create user zq password 'gbase_4U';
CREATE ROLE
postgres=# alter user zq login;
ALTER ROLE

再以zq登陆

[gbase@node1 ~]$ gsql -d postgres -Uzq -h 192.168.133.42  -p 5432
Password for user zq:
gsql ((multiple_nodes GBase8cV5 3.0.0B114 build 9b50bc36) compiled at 2023-11-07 19:39:08 commit 0 last mr 1763 )
SSL connection (cipher: ECDHE-RSA-AES128-GCM-SHA256, bits: 128)
Type "help" for help.

postgres=>

但初始用户还未能登陆,后面再看。


分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友
收藏收藏 支持支持 反对反对
回复

使用道具 举报

沙发
 楼主| 发表于 2025-12-10 19:52:09 | 只看该作者
正常还应该修改data store,gtm
gs_guc reload -Z datanode  -N all -I all -h "host all all 0.0.0.0/0 sha256"
gs_guc reload -Z datanode -N all -I all -c "password_encryption_type=1"
gs_guc reload -Z datanode -N all -I all -c "listen_addresses='*'"

gs_guc reload -Z gtm  -N all -I all -h "host all all 0.0.0.0/0 sha256"
gs_guc reload -Z gtm -N all -I all -c "password_encryption_type=1"
gs_guc reload -Z gtm -N all -I all -c "listen_addresses='*'"
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

QQ|手机版|小黑屋|重庆思庄Oracle、Redhat认证学习论坛 ( 渝ICP备12004239号-4 )

GMT+8, 2026-4-17 22:23 , Processed in 0.288334 second(s), 16 queries .

重庆思庄学习中心论坛-重庆思庄科技有限公司论坛

© 2001-2020

快速回复 返回顶部 返回列表