且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何解决 Postgresql SCRAM 身份验证问题?

更新时间:2023-09-20 19:13:16

您的应用程序使用与 PostgreSQL 客户端 C 库 libpq 链接的 API.

Your application uses an API that is linked with the PostgreSQL client C library libpq.

该库的版本必须是 9.6 或更低版本,并且在 v10 中引入了 SCRAM 身份验证.

The version of that library must be 9.6 or older, and SCRAM authentication was introduced in v10.

升级libpq 在应用端并重试.

如果不需要scram-sha-256认证,可以恢复为md5:

If you don't need scram-sha-256 authentication, you can revert to md5:

  • postgresql.conf
  • 中设置password_encryption = md5
  • pg_hba_conf中的认证方式改为md5
  • 重新加载 PostgreSQL
  • 修改用户密码,获取MD5加密密码