Công nghệ GIS Mẹo vặt

Fix Unable to connect to PostgreSQL server: SCRAM authentication requires libpq version 10 or above

Table of Content

Unable to connect to PostgreSQL server: SCRAM authentication requires libpq version 10 or above

I used to get an error SCRAM authentication requires libpq version 10 or above when running php artisan migrate in laravel 8. Then I fixed it as follows: Change authentication from scram-sha-256 to md5, then reset your password and restart the postgresql-x64-13 service and here are step by step:

  1. Step 1: Find file postgresql.conf in C:\Program Files\PostgreSQL\13\data then set password_encryption = md5
  2. Step 2: Find file pg_hba.conf in C:\Program Files\PostgreSQL\13\data then change all METHOD to md5
  3. Step 3: Open command line (cmd,cmder,git bash...) and run psql -U postgres then enter your password when installed postgres sql
  4. Step 4: Then change your password by run ALTER USER postgres WITH PASSWORD 'new-password' in command line

ALTER USER postgres WITH PASSWORD 'new-password';

  1. Final: Restart service postgresql-x64-13 in your Service.

postgresql.conf

image

Fix to

image

pg_hba.conf

image

Fix to

image


https://stackoverflow.com/questions/62807717/how-can-i-solve-postgresql-scram-authentifcation-problem

Leave a Reply

Your email address will not be published. Required fields are marked *