By robspages
Hi. I copy/pasted the psql connection string for my managed database from the managed database dashboard. I have my public-facing IP address as a Trusted Source.
When executing the psql command I get this reponse:
psql: error: connection to server at <DB HOST> (<DB HOST IP), port <DB PORT> failed: could not initiate GSSAPI security context: The operation or option is not available: Credential for asked mech-type mech not found in the credential handle
connection to server at <DB HOST> (<DB HOST IP), port <DB PORT> failed: SSL error: certificate verify failed
connection to server at <DB HOST> (<DB HOST IP), port <DB PORT> failed: FATAL: no pg_hba.conf entry for host "<MY TRUSTED IP>", user "<MY DB USER>", database "<MY DATABASE>", no encryption
I have installed the CA Certificate locally.
What am I missing?
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Hi there,
Can you share the exact psql
command that you are using to connect?
Usually the following should work when using the CA certificate:
PGPASSWORD=your_password psql -U doadmin -h cluster-do-user-1234567-0.db.ondigitalocean.com -p 25060 -d defaultdb --set=sslmode=require --set=sslrootcert=path/to/your-ssl.crt
Also can you confirm how did you install the certificate and what is the exact OS that you are using locally?
Besides that, what is the exact psql
CLI version that you are using?
- Bobby
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.