Database "linpostgres", no encryption
I am trying to connect to Linode Postgres through psql cli (also tried with pgAdmin)
I am using this command here:
psql --host=lin-[REDACTED]-[REDACTED]-pgsql-primary.servers.linodedb.net --username=linpostgres --password
and getting this full error:
psql: error: connection to server at "lin-[R]-[R]-pgsql-primary.servers.linod
edb.net" (REDACTED), port 5432 failed: FATAL: password authentication fai
led for user "linpostgres"
connection to server at "lin-[R]-[R]-pgsql-primary.servers.linodedb.net" (REDACTED), port 5432 failed: FATAL: no pg_hba.conf entry for host "REDACTED", user "linpostgres", database "linpostgres", no encryption
Then, when attempting to connect with PGadmin, I get the error that I DID supply the CA cert, but no private key (which was not supplied to me)
I did allow my ip address.
Any help with this appreciated, thanks!
I notice in your connection string, you have not specified a database to connect to. In the documentation, the suggested connection string for psql looks like this:
psql --host=[host] --username=[username] --password --dbname=postgres
You may be getting a password authentication failure because you're not adding that database name.
It's worth noting that the default dbname is "postgres", however, a best practice is to create a new username and dbname for any application you're making.
When connecting via PGadmin, you can check out the documentation if you haven't already. You should be able to make changes to the SSL settings if you do not have the CA certificate downloaded. Alternatively, you can download the CA certificate from your cluster's info page in Cloud Manager.