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.

@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 :/

Bobby Iliev
Site Moderator
Site Moderator badge
August 22, 2019

Hello,

Regarding the MySQL cli, as far as I know on OSX the default MySQL client is 5.7 and you can not use MySQL 5.7 client to connect to MySQL 8. I tested that and I’m getting the same SSL error as you do when using MySQL 5.7 client.

Regarding TablePlus, are you selecting MySQL 8 from the drop-down menu? Also you need to make sure that you are adding the SSL certificate to the CA filed under your TablePlus SSL settings.

Let me know how it goes! Regards, Bobby

Become a contributor for community

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

DigitalOcean Documentation

Full documentation for every DigitalOcean product.

Resources for startups and SMBs

The Wave has everything you need to know about building a business, from raising funding to marketing your product.

Get our newsletter

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

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.