简体   繁体   中英

Delphi XE6 on Windows 7 64bit, FireDAC cannot find libmysql.dll

I have a little different question from Delphi XE5 FireDAC Error: Cannot load vendor library libmysql.dll or libmysqld.dll

I'm evaluating Delphi XE6 on Windows 7 64bit, I wish to use FireDAC to connect to MySQL database.

I have downloaded libmysql.dll and install the file in C:\\Windows\\SYSTEM32\\ .

After trying to set TFDConnection.Active to true during designed time, I got error dialog as displayed below.

在此处输入图片说明

So I tried to use TFDPyhsMySQLDriverLink , I have set TFDPyhsMySQLLink.VendorLib to C:\\Windows\\System32\\libmysql.dll , and set TFDConnection.DriverName to point to TFDPyhsMySQLLink.DriverID instead, but I got error dialog as displayed below.

在此处输入图片说明

I have tried to place libmysql.dll at C:\\Windows\\System32\\bin but the error dialog still the same as displayed above.

Please guide me what to do to fix this problem.

With carefully reading this comment and this comment

There are a few facts to fix the problem. - Delphi IDE is a 32 bit application so I need libmysql.dll (32 bit version) instead of 64 bit version. - libmysql.dll version not depending on the MySQL server itself as I used to misunderstood - C:\\Windows\\SysWOW64 is equivalent to C:\\Windows\\System32 but it's the place to store system dll for the 32 bit Application (like Delphi)

So I've placed the libmysql.dll (32 bit version) at C:\\Windows\\SysWOW64 , finally the problem is fixed.

xampp

C:\xampp\mysql\lib\libmysql.dll 
C:\xampp\mysql\lib\libmysqld.dll

COPY TO

C:\\Program Files (x86)\\Embarcadero\\RAD Studio\\XX.X\\bin

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM