0

I provisioned Databases for PostgreSQL on IBM Cloud. Now I try to connect SQuirreL to my database. However, my attempts result in this error:

FATAL: no pg_hba.conf entry for host "xx.xx.xx.xx", user "myuser", database "my-database", SSL off

Is this related to the JDBC driver or any SSL setting? The credentials say sslmode=verify-full, but not sure how to specify it in SQuirreL.

data_henrik
  • 16,724
  • 2
  • 28
  • 49

1 Answers1

3

I was able to connect with the standard JDBC driver for PostgreSQL after changing the driver properties:

Simple, but not secure approach:
- ssl=true
- sslfactory=org.postgresql.ssl.NonValidatingFactory

Secure, more effort:
- download the SSL certificate as provided in the credentials
- add ?sslmode=verify-full&sslrootcert=path-to-certificate to the connection URI

Now SQuirrel connects to my database with IBM Cloud Databases for PostgreSQL. This also works with Hyper Protect DBaaS.

data_henrik
  • 16,724
  • 2
  • 28
  • 49