Ok, I've spent all day on this, and I am stuck, so I'm going to ask for help.
I previously installed Delphi 11 Enterprise in a virtual machine, and also installed MySQL 8.0.27 (64-bit). After obtaining some 32-bit MySQL dlls I was able to easily connect to my database using the FireDAC MySQL driver and from the Data Explorer in the Delphi IDE.
I have now created a new VM and installed both Delphi 11.1 Enterprise and MySQL 8.0.28. After exporting my database from the previous VM, and importing it into this new MySQL server, I tried to attach to the database using FireDAC. Using the same parameters as in the last VM, and the same dlls copied to C:\Windows\SysWOW64, testing the connection fails and produces the following error:
[FireDAC][Phys][MySQL] SSL connection error: unknown error number
I've compared the parameters for connecting to the two databases between the two VMs, and they are the same. And, the connections in MySQL to the two databases also appear to be the same.
One thing that is odd (and I think I know why) is that in the VM where the connection fails, if I view the Info tab of the FireDAC Connection Editor, it says it is using libmysql.dll in the c:\Windows\System32 folder (there's no such file in that folder). But that is also true from the Connection Editor in the VM where FireDAC successfully connects, so I am assuming that System32 is being mapped to C:\Windows\SysWOW64.
If anyone can affirm that they are successfully connecting to MySQL 8... using Delphi 11.1 and FireDAC, and can offer a suggestion for what I need to fix, I will be grateful.
CodePudding user response:
Be sure from where your app is loading the libmysql.dll by calling h:= loadlibray('libmysql.dll') /without path/ and then GetModulePath(h) to see its full path.
Remember that Delphi is 32bit and it needs to use 32bit version of lobmysql.dll while a 64bit compiled program would need the same bitbness.
CodePudding user response:
Try this - it might help, might not. It definitely can connect to MySQL 8, configured in various ways.
https://github.com/checkdigits/d11mysql8test
It's a Delphi 11.1 project with some recent libmaria and open SSL dlls.