GBase 8c
适配迁移
文章
FAQ : 远程连接GBase 8c报错“获取连接失败 Invalid or unsupported by client SCRAM mechanisms”
GBase社区管理员发表于2023-04-27 13:08:281045次浏览0个评论
问题描述:
使用DMT配置数据库信息,远程连接失败,显示报错信息“获取连接失败 Invalid or unsupported by client SCRAM mechanisms”。
解决办法:
1、在远程连接之前,使用gs_guc工具在GBase 8c数据库上执行以下命令(分布式需要指定-Z参数,主备式不指定):
gs_guc reload <-Z coordinator/datanode> -N all -I all -h "host all all 0.0.0.0/0 sha256"
gs_guc reload <-Z coordinator/datanode> -N all -I all -c "password_encryption_type=1"
gs_guc reload <-Z coordinator/datanode> -N all -I all -c "listen_addresses='*'"
执行后,可登录数据库,使用show 参数名命令,查看后两条命令是否已执行生效。
2、修改后,创建用户:
create user user_name sysadmin password 'passwd';
通过该用户密码远程连接数据库。
解释:
使用show password_encryption_type可以查看密码的加密方式。
当password_encryption_type=1是表示采用sha256方式对密码加密,兼容postgres客户端的MD5用户认证方式。
password_encryption_type=2表示采用sha256方式对密码加密,此时不兼容postgres开源驱动和开源客户端。
评论已关闭
热门帖子
- 12025-12-01浏览数:182268
- 22023-05-09浏览数:24522
- 42023-09-25浏览数:17800
- 52020-05-11浏览数:16827