Postgres Query

Summary

Trying to follow

Connect Streamlit to PostgreSQL - Streamlit Docs

instructions

to connect to a remote postgres server but receiving ssl error.

Steps to reproduce

Just followed the oficial documentation

Expected behavior:

Return query

Actual behavior:

receiving:

perationalError: connection to server at "ep-square-pine-732133.us-east-2.aws.neon.tech" (3.23.186.13), port 5432 failed: ERROR: password authentication failed for user 'thiagoiklock' connection to server at "ep-square-pine-732133.us-east-2.aws.neon.tech" (3.23.186.13), port 5432 failed: ERROR: connection is insecure (try using `sslmode=require`)

Debug info

Python 3.10 on arch

Hey @Thiago_Klock,

Based on that error message, it sounds like the password you’re using isn’t correct, or your PostgresSQL account doesn’t support authentication via password. Have you checked out this PostgresSQL doc?

FATAL: password authentication failed for user "andym"
Messages like this indicate that you contacted the server, and it is willing to talk to you, but not until you pass the authorization method specified in the pg_hba.conf file. Check the password you are providing, or check your Kerberos or ident software if the complaint mentions one of those authentication types.