I would be grateful for any help in connecting to a MySQL 8.0 database using Zeos. (I don't mind using the built-in database components either, but they had similar problems.)
The set-up is as follows:
OS: Windows 11 Pro 64 bit
Lazarus version: 2.2.2
Date: 2022-05-15
FPC version: 3.2.2
Revision: lazarus_2_2_2
x86_64-win64-win32/win64
Under Configure "Build Lazarus" I have the following:
LCL widget type: win32/win64
Target OS: Win64
Target CPU: x86_64
The MySQL server is on a 64-bit version of Wamp; it is MySQL 8.0.32.
I have taken the libmysql.dll file from the Wamp installation and placed in into the project folder.
So as far as I can see, everything should be working as 64-bit.
The Zeos version is 7.2.14-release. Under the TZConnection properties I have:
Protocol: mysql-5 (I have also tried mysql, but it gives the same error)
Library location points to the libmysql.dll file in the project folder.
I have no problem connecting to this database via Navicat.
When I try to connect with Zeos (by setting "Connected" to True), I get the error: "Client library ... libmysql.dll found but could not be loaded. Check compile-target and library compatibility!"
I've tried everything I can think of, but now I am truly stuck! I would be grateful for any help or pointers for a solution. I was previously able to connect to MySQL 5.6 using the built-in database components, so this is quite a mystery to me. One of the challenges seems to be that it is difficult (impossible?) to find a 32-bit version of the libmysql.dll file for MySQL 8.0. With MySQL (if I remember correctly) I compiled to 32 bits and used the 32-bit version of the dll.
Thank you in advance.