0

I'm trying to set up an ODBC datasource to a postgres DB on windows. I'm using ODBC Data Source Administrator (64-bit) with version 13.0 of PostgreSQL Unicode(x64) driver.

I've set username to postgres with the appropriate password. Clicking on the test button tells me the connection is ok. However, the postgres account is the top-level, master account that gives full access to the postgres database server. How can I set up the ODBC datasource to use one of my read-only accounts that have access to just the required data/views only? The error message for any of the accounts I want to use is FATAL: password authentication failed for user 'myuser'

(not sure if this is relevant but... Database is called myDb, SSL mode is disabled, server is localhost, port is 5432)

Update in response to comments - the postgres log entry also says authentication failed. Resetting the account makes no difference (nor does creating a new account just for testing). The database config file postgresql.conf indicates that password_encryption = md5. If memory serves me correctly I had to switch to md5 to allow .net applications to connect.

1
  • Look into the server log. If that also tells you that "password authentication failed", that's what happened. Perhaps you used the wrong password. Perhaps you should set the password for the user again. Perhaps you use scram-sha-256 authentication, but an MD5 password hash. Commented Dec 8, 2024 at 21:29

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.