Can't connect with mysql 8

Hi,
my name is Mauricio, i’m from Brazil
I still have some web applications in version 2019R1.1 despite actually developing in 2024r1.
2019r1.1 applications connect with MYSQL 5.7 it works fine !
My operating system for development is Windows Server
The Mysql 8.3 no Ubuntu 20
I have to upgrade to MYSQL 8.3 , i already know that mysql 8.0.26 Tls v.1 and v.1.1 are deprecated.
I would like to know if i can work with 2019r1.1 with mysql 8.3 or even 8.0.35 for example using required SSL connection.
I did the following:
in my windows machine:
copied from Ubuntu sql .pem files and i created a folder in windows c:\ssl
i put the .pem files into c:\ssl
ca.pem, ca-key.pem, client-cert.pem, cliente-key.pem, private_key.pem, public_key.pem,
server-cert.pem, server-key.pem

My code:

Dim db As New MySQLCommunityServer
db.Host = “myhost”
db.Port = 3306
db.DatabaseName = “mydatabase”
db.UserName = “myuser”
db.Password = “mypasswordd”
db.SSLMode = true

//Specify SSL key file
Dim keyFile As FolderItem
keyFile = GetFolderItem(“c:\ssl\server-key.pem”)
db.SSLKey = keyFile

// Specify SSL certificate file
Dim certFile As FolderItem
certFile = GetFolderItem(“c:\ssl\server-cert.pem”)
db.SSLCertificate = certFile

// Specify SSL authority file
Dim authFile As FolderItem
authFile = GetFolderItem(“c:\ssl\ca.pem”)
db.SSLAuthority = authFile

//Specify SSL authority directory
Dim authPath As FolderItem
authPath = GetFolderItem(“c:\ssl\ca.pem”)
db.SSLAuthorityDirectory = authPath

// Specify SSL cipher
Dim cipher As String
cipher = “DHE-RSA-AES256-SHA”
db.SSLCipher = cipher

If db.Connect Then
msgbox(“Ok”)
else
msgbox str(db.Error) + " " + str(db.ErrorCode) + " " + db.ErrorMessage
end if

I tried to change file name in options but nothing works

The first error is:
True 2026 SSL connection error: unknown error number
sometimes:
True 2026 SSL connection error: SSL_CTX_set_default_verify_paths failed
I don’t know if i am making something wrong or 2019r.1.1 won’t work with mysql 8

I don’t understand //Specify SSL authority directory

anybody could help me ? an example would be great !

Thanks
Mauricio

Dim db As New MySQLCommunityServer
db.Host = “myhost”
db.Port = 3306
db.DatabaseName = “mydatabase”
db.UserName = “myuser”
db.Password = “mypasswordd”
db.SSLMode = true
’
//Specify SSL key file
Dim keyFile As FolderItem
keyFile = GetFolderItem(“c:\ssl\server-key.pem”)
db.SSLKey = keyFile

// Specify SSL certificate file
Dim certFile As FolderItem
certFile = GetFolderItem(“c:\ssl\server-cert.pem”)
db.SSLCertificate = certFile

// Specify SSL authority file
Dim authFile As FolderItem
authFile = GetFolderItem(“c:\ssl\ca.pem”)
db.SSLAuthority = authFile

//Specify SSL authority directory
Dim authPath As FolderItem
authPath = GetFolderItem(“c:\ssl\ca.pem”)
db.SSLAuthorityDirectory = authPath

// Specify SSL cipher
Dim cipher As String
cipher = “DHE-RSA-AES256-SHA”
db.SSLCipher = cipher

If db.Connect Then
msgbox(“Ok”)
else
msgbox str(db.Error) + " " + str(db.ErrorCode) + " " + db.ErrorMessage
end if

To help responder’s read better

Maybe related,
#65437 - mysql 8.0 connection does not work for new default database security model

A few years ago I had issues with a Web1 application (Xojo 2019R3.2) connecting to MySQL 8. I copied the MySQL plugin from the current release of Xojo into the Xojo 2019R3.2 plugins folder. Then re-open xojo 2019R3.2 and build the app. So far no problems but I am planning to replace this old app in the next few months.