0

I am using the command psql -U <username> -W to connect to a Postgres server running on localhost under Ubuntu (via WSL2). After entering the password manually, the command errors out with the message: psql: SCRAM authentication requires libpq version 10 or above

It must be a problem with psql itself because I am able to connect to the database successfully using the Datagrip application.

What are the steps to fix this?

Phillip Ngan
  • 15,482
  • 8
  • 63
  • 79
  • Install (or use) a newer version of psql, at least version 10 – Frank Heikens May 11 '23 at 04:54
  • Prior to version 10 of postgresql, the `password_encryption` was `MD5`. As of version 10, you can configure either `MD5` or `scram-sha-256` (recommended). The error is telling you you are trying to connect to a version of postgresql using `scram-sha-256` password encryption from a setup that supports only `MD5`. (you need a newer version of `libpq`). – David C. Rankin May 11 '23 at 04:59
  • Uninstall the ancient PostgreSQL software installed in addition to the current one. – Laurenz Albe May 11 '23 at 06:13

0 Answers0