I am trying to migrate an old delphi7 app from using mysql4 to mysql5.
Back in times, I was using microolap dbx4mysql dbxdriver which is deprecated for long now, so I am trying your latest version of the dbxdriver, but I get these errors when I try to connect to the server
i tried putting different versions of the libeay32.dll and ssleay32.dll in the app folder, but I get the same results. The only difference is that sometimes I get error 0 and sometimes -1.
I checked Microsoft ProcessMonitor to make sure my project is loading the DLL files from the app folder.
Navicat and MySQLWorkbench connect fine using the same user/password and same cert files.
Below is my code. According to your documentation, everything should be ok, but it doesn't work. Can you please tell me what may be wrong?
Code: Select all
procedure TForm1.Button2Click(Sender: TObject); begin SQLConnection.DriverName := 'DevartMySQLDirect'; SQLConnection.LibraryName := 'dbexpmda.dll'; SQLConnection.VendorLib := 'not used'; SQLConnection.GetDriverFunc := 'getSQLDriverMySQLDirect'; SQLConnection.Params.Clear; SQLConnection.Params.Add('Custom String=Protocol=SSL'); SQLConnection.Params.Values['HostName']:='220.127.116.11:3307'; SQLConnection.Params.Values['Database']:='mydb'; SQLConnection.Params.Values['User_name']:='dbuser'; SQLConnection.Params.Values['Password']:='mypsw'; SQLConnection.Params.Values['SSLCACert'] := 'd:\test-certs\ca-cert.pem'; SQLConnection.Params.Values['SSLCert'] := 'd:\test-certs\client-test-cert.pem'; SQLConnection.Params.Values['SSLKey'] := 'd:\test-certs\client-test-key.pem'; SQLConnection.Params.Values['SSLCipherList'] := 'ALL'; SQLConnection.Open; end;
- SSL version : TLS v1.1
- DB version : 5.5.52-MariaDB
- SSL cipher : DHE-RSA-AES256-SHA
Thank you in advance