连接GaussDB(DWS)报错:Invalid or unsupported by client SCRAM mechanisms

用postgres方式连接GaussDB(DWS)报错:Invalid or unsupported by client SCRAM mechanisms

报错内容

2023-12-27 21:43:35\] Invalid or unsupported by client SCRAM mechanisms org.postgresql.util.PSQLException: Invalid or unsupported by client SCRAM mechanisms ![](https://file.jishuzhan.net/article/1740510191520059393/feb0e8e82c3abf5a0597f7675c0bfdc2.webp) ### 原因:password_encryption_type未兼容postgres访问 > "使用show password_encryption_type可以查看密码的加密方式。当password_encryption_type=1是表示采用sha256方式对密码加密,兼容postgres客户端的MD5用户认证方式。password_encryption_type=2表示采用sha256方式对密码加密,此时不兼容postgres开源驱动和开源客户端。使用postgres开源生态工具连接会出现报错,连接GaussDB(DWS)出现如下报错: > > The authentication type 10 is not supported. > > Invalid or unsupported by client SCRAM mechanisms。" ![](https://file.jishuzhan.net/article/1740510191520059393/6c9c8da541ffcf519e14c54a632061f9.webp) ### 解决办法: 1、修改password_encryption_type=1 2、需要重新创建用户去连接,连接成功 连接参考:[https://zhuanlan.zhihu.com/p/646963995](https://zhuanlan.zhihu.com/p/646963995 "https://zhuanlan.zhihu.com/p/646963995") [连接和认证 - 安全和认证(postgresql.conf) - 《华为 openGauss (GaussDB) 1.0.1 使用手册》](https://www.bookstack.cn/read/opengauss-1.0.1-zh/967c05d840243472.md "连接和认证 - 安全和认证(postgresql.conf) - 《华为 openGauss (GaussDB) 1.0.1 使用手册》") [【DWS】某局点使用工具连接数据库报错 (huawei.com)](https://forum.huawei.com/enterprise/zh/thread/663365942098411520 "【DWS】某局点使用工具连接数据库报错 (huawei.com)") [你应该知道的数仓安全------安全认证-云社区](https://bbs.huaweicloud.com/blogs/249702 "你应该知道的数仓安全——安全认证-云社区")

相关推荐
天天向上杰4 天前
浅识:GaussDB的WAL日志
gaussdb
Gauss松鼠会5 天前
【openGauss】如何在openGauss中实现类似Oracle中constructor function、member function的功能
数据库·oracle·database·gaussdb
BullSmall8 天前
GaussDBT删除用户全攻略
gaussdb
聊天QQ:4877392788 天前
3dec 单轴与三轴压缩实验模拟探索
gaussdb
天天向上杰11 天前
小识:从理财数仓角度看GaussDB、PostgreSQL、Hive 三区别
hive·hadoop·gaussdb
九河云11 天前
华为云 GaussDB 分布式架构解析:企业级数据库高可用与性能调优方案
分布式·架构·华为云·云计算·gaussdb
无心水15 天前
【分布式利器:大厂技术】5、华为分布式方案:国产化适配+政企高可靠,鲲鹏/昇腾生态核心技术
分布式·华为·gaussdb·分布式利器·华为分布式·国产化数据库·政企高可靠
yubin128557092317 天前
Gaussdb数据类型
gaussdb
Gauss松鼠会19 天前
【GaussDB】如何从GaussDB发布包中提取出内核二进制文件
linux·数据库·database·gaussdb
robinson198820 天前
OpenTeleDB xstore vs GaussDB ustore表膨胀测试
表膨胀·gaussdb·ustore·openteledb·xstore