Question

Can't connect to MySQL instance in managed databases

Managed MySQL instances were just released yesterday so I decided to spin one up to test it out. I have not been able to connect to the instance using any tool at my disposal. Running OSX 10.14.6

  • Sequel Pro (nightly build) produces this error: MySQL said: SSL connection error: socket layer receive error
  • TablePlus produces this error: SSL connection error: error:00000005:lib(0):func(0):DH lib
  • MySQL cli using this command
mysql -u doadmin -*********** -h db-mysql-***-71474-do-user-******-0.db.ondigitalocean.com -P 25060 -D defaultdb

produces this error: ERROR 2026 (HY000): SSL connection error: error:00000000:lib(0):func(0):reason(0)

What is required in order to connect to this database? I’ve downloaded the CA Cert that was provided. I’ve installed that via Keychain. I’ve also provided it to Sequel Pro and TablePlus in the proper fields on the login dialogs. What am I missing? This doesn’t seem to be addressed in the connection docs (https://www.digitalocean.com/docs/databases/mysql/how-to/connect/) or the troubleshooting docs (https://www.digitalocean.com/docs/databases/mysql/resources/troubleshoot-connections/).


Submit an answer


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!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Accepted Answer

Answer: Okay I think I’ve gotten to the bottom of this. I can’t edit my original question but leaving this here in case someone else runs into it.

The use of the non-standard port must have been blocked on my network. After changing networks and verifying the port is open, it now connects. So I’ve learned from this:

  • This cryptic error that MySQL cli gives you might indicate a blocked port: ERROR 2026 (HY000): SSL connection error: error:00000000:lib(0):func(0):reason(0)
  • There is a (minor) bug in TablePlus 2.8.1 when connecting with ssl. If the connection is initially blocked like it was in my case, the saved instance of that connection will be fubared even if you move to a good network. You have to create a whole new connection and enter credentials and cert again.
  • Sequel Pro (build 5446): As far as I can tell at the moment, it simply does not work with DO managed databases. Always returns an unknown SSL error.

Updating the mysql-client worked for me.

mysql -V
mysql  Ver 14.14 Distrib 5.7.28, for Linux (x86_64) using  EditLine wrapper

(It was using the 5.7.27 previously)

@PHF, @jhazel, I have tried the latest sequel pro build (https://sequelpro.com/test-builds) and it does not work. I used TCP/IP connection with the SSL enabled and passing ca-certificate.crt to it.

Would be lovely to see some good alternatives or ideas for what to try to have Sequel Pro connecting :/

Try DigitalOcean for free

Click below to sign up and get $200 of credit to try our products over 60 days!

Sign up

Featured on Community

Get our biweekly newsletter

Sign up for Infrastructure as a Newsletter.

Hollie's Hub for Good

Working on improving health and education, reducing inequality, and spurring economic growth? We'd like to help.

Become a contributor

Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.

Welcome to the developer cloud

DigitalOcean makes it simple to launch in the cloud and scale up as you grow — whether you're running one virtual machine or ten thousand.

Learn more