Has something changed in MySQLCommunityServer since Xojo 2019R1.1?

Hello everybody! I’m going crazy in the last few days as many of my apps aren’t able to connect anymore to a remote mySQL database:

Here’s the code i have in Xojo 2019 R1.1

Dim con As New MySQLCommunityServer

con.Host = "database_ip_address"
con.port = 3306
con.DatabaseName = "database_name"
con.UserName = "database_usename"
con.Password = "database_username_password"

If con.Connect Then
  TextArea1.Text = "Connected!"
  TextArea1.Text = "Error: "+Str(con.ErrorCode)+" "+con.ErrorMessage
End If

Here’s the code i have in Xojo 2021 R2

Var con As New MySQLCommunityServer

con.Host = "database_ip_address"
con.port = 3306
con.DatabaseName = "database_name"
con.UserName = "database_usename"
con.Password = "database_username_password"

Catch err As DatabaseException
  TextArea1.Text = "Error: "+err.ErrorNumber.ToString+" "+err.Message
End Try

Code in Xojo 2019 R1.1 works perfectly and i’m able to connect, code in Xojo 2021 R2 gives the error: “2026 SSL connection error: error:00000001:lib(0):func(0):reason(1)”

I’m going out of my mind… can someone help?


Have you already tried to work with

con.SecureAuth = False/True
con. SSLEnabled = False/True

Start with both = False :wink:

Hello Sascha,
thanks a lot for your answer, already tried that in any combination, unfortunately it still won’t connect :frowning:

Is your server using SSL?

If it is then maybe its using an old insecure protocol that the latest MySQLCommunityServer plugin (ie: MySQL client libs) no longer supports.

1 Like

Regarding stack overflow (yes, i know…) it may be possible that the SSL Cert. is no longer “good enough”.

See also here.

Thanks again guys for your help, currently our Cloud MySQL (hosted on Rackspace) is not directly accessible from the internet, to reach it we connect to a Load Balancer that acts as a bridge between us and the MySQL Server. I’ve passed most of yesterday evening with Rackspace tech support and they told me that the load balancer is able to accept both secure and insecure connections, so the SSL shouldn’t be a problem. Unfortunately i’m not so skilled in this kind of things and must take what they told me as true. Next step i’m going to do is try to set up an SSL cert for the load balancer… i currently don’t see any kind of option to have the link working again.

PS: everything was working perfectly until some days ago… then stopped and starting trowing the error… however Rackspace told me nothing has changed in our configuration… i kinda doubt id :slight_smile:

I notice in your code that you’re not actually using ssl though. I know you said you tried with it, but the error you are getting would seem to indicate that your server requires ssl and you’re not using it.

Now in terms of changes, it appears that the macOS client library was updated from 5.6.26 to 5.7.32 in 2020r2, but that appears to be the only change we’ve made that could have changed behavior.

Thanks Greg, i’ll try to stress Rackspace hoping they’ll find what may have changed in our configuration then.

Create a VM and install Mysql there, ensure that it’s ok and connectable, then try to connect to it using Xojo.
If it fails, report to Xojo.
If it passes:
Find you version of mysql you guys use in Rackspace, install it in a new vm, try to connect.
If it fails, report to Xojo.
If it passes, report to Rackspace.

1 Like