Connecting to MySQL Digital Ocean Managed Database

Has anyone been able to successfully connect their App to Digital Ocean’s MySQL managed databases? They use MySql8 and require SSL. I am trying to do so internally from a DigitalOcean droplet and keep getting a 2026 error.

I am using the SSL certificate that Digital Ocean provides with their managed database servers. I am able to connect to it using Workbench from my Mac using the supplied certificate file. I have been unable to get a xojo app running on a ubuntu 18 droplet to connect. I have tried both a 5.7 compatible user and 8 compatible user. Both get a 2026 error. I am running mysql 5.7 on the droplet. Do I need to upgrade that to 8? Is Xojo using libraries from the installed mysql to try to connect? Any suggestions would be greatly appreciated.

I’m pretty sure xojo uses the libraries compiled with his own mysql plugin

I am using 2019r3.2 if that matters.

Turned out to be user error. :slight_smile: username misspelled will get you every time!

Place the CRT file supplied by DigitalOcean in parent of application

Here is the code that works just so people who are searching can see

dim tempDB as new MySQLCommunityServer = “DigitalOceanSuppliedHostName”
tempDB.port = DigitalOceanSuppliedPort
tempDB.DatabaseName = “databasename”
tempDB.UserName = “UserName”
tempDB.Password = “Password”


Catch error as DatabaseException
MsgBox(error.ErrorNumber.ToString+" "+error.Message)
End Try

1 Like