How can I solve Postgresql SCRAM authentifcation problem?
I am getting an error after moving the project to production. The error is as follows while running with production server pg_connect(): Unable to connect to PostgreSQL server: SCRAM authentication requires libpq version 10 or above.
Tagged:
0
Answers
-
Your application uses an API that is linked with the PostgreSQL client C library
libpq
.The version of that library must be 9.6 or older, and SCRAM authentication was introduced in v10.
Method 1: Upgrade
libpq
on the application end and try again.yum install https://download.postgresql.org/pub/repos/yum/reporpms/EL-7-x86_64/pgdg-redhat-repo-latest.noarch.rpm yum install postgresql10-libs postgresql10 postgresql10-devel
For your OS flavour and required virsion follow the link https://www.postgresql.org/download/linux/redhat/
Method 2: If you don't need
scram-sha-256
authentication, you can revert tomd5
:- set
password_encryption = md5
inpostgresql.conf
- change the authentication method to
md5
inpg_hba_conf
- reload PostgreSQL
- change the password of the user to get an MD5 encrypted password
0 - set
Howdy, Stranger!
Categories
- 94 All Categories
- 20 VoIP
- 7 SIP
- 16 asterisk
- 44 Programming
- 1 Nodejs
- 4 javascript
- 19 PHP
- 8 Codeigniter
- 14 database
- 1 UI/UX
- 2 Flutter
- 28 OS
- 26 Linux
- 1 Virtualization
- 1 Android
- 1 Windows
- 2 legal