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

You can use the latest tet build from sequal pro. That one works. https://sequelpro.com/test-builds

I hope someone can help me…

After ALTER USER '...'@'%' IDENTIFIED WITH mysql_native_password BY '...';

I can connect commandline via mysql -u etc…

Via php(7.1.12) on 1 server i get SQLSTATE[HY000] [2054] The server requested authentication method unknown to the client

Via php(7.1.12) on another server i get Error: SQLSTATE[HY000] [2006] MySQL server has gone away

How can i use mysql8 with php PDO?