'Unable to connect to db using scram authentication
I chnaged authentication method from md5 to scram-sha-256, but when i am trying to connect to db , I am able to connect via psql client but not able to connect through php module (PDO_PGSQL).
getting this error:
Warning: pg_connect(): Unable to connect to PostgreSQL server: FATAL: password authentication failed for user "ubteam" FATAL: password authentication failed for user "ubteam" in D:\Users\Shiv\xammp\htdocs\vihs\index.php on line 9 Connection attempt failed. Fatal error: Uncaught TypeError: pg_close(): Argument #1 ($connection) must be of type ?PgSql\Connection, bool given in D:\Users\Shiv\xammp\htdocs\vihs\index.php:16 Stack trace: #0 D:\Users\Shiv\xammp\htdocs\vihs\index.php(16): pg_close(false) #1 {main} thrown in D:\Users\Shiv\xammp\htdocs\vihs\index.php on line 16
rds logs:
2022-05-04 09:36:07 UTC:10.85.4.59(58167):ubteam@postgres:[7357]:FATAL: password authentication failed for user "ubteam" 2022-05-04 09:36:07 UTC:10.85.4.59(58167):ubteam@postgres:[7357]:DETAIL: Connection matched pg_hba.conf line 13: "host all all all md5" 2022-05-04 09:36:07 UTC:10.85.4.59(58171):ubteam@postgres:[7387]:FATAL: password authentication failed for user "ubteam" 2022-05-04 09:36:07 UTC:10.85.4.59(58171):ubteam@postgres:[7387]:DETAIL: Connection matched pg_hba.conf line 13: "host all all all md5"
I am using RDS postgres12 hosted by amazon
Can someone help here
Thanks in advance
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
