简体   繁体   中英

Delphi with MySQL 64-bit Firedac

Hello I have been using MySQL, 64 bit with Firedac in my development environment, and am trying to move the app to a new machine. I have installed MySQL 8 on the new machine and works fine.

I have made a simple app to connect in delphi XE8. I built a 64 bit application. I include a mysql dll in the directory of the executable. It seems to need to be

libmysql.dll from 6/10.2019 @ 09:51 3,984 KB. If I remove this file from the exe directory on the development machine, I get error:

[FireDAC][Phys][MySQL]-314. Cannot load vendor library [libmysql.dll or libmysqld.dll]. The specified module could not be found. Hint: check it is in the PATH or application EXE directories and has x64 bitness.

I can run the program outside of the IDE only with the libmysql.dll included in the exe directory.

If I copy the folder which contains the application to a new machine, whether the libmysql.dll is included in the directory or not, I get the same error, as above.

Can anyone with experience in MySQL 64 version 8 and Firedac please help me to get this working? It should really be a simple thing, and it needs to work on a new machine without delphi installed.

Thanks Doug

You will get the same error message if your libmysql.dll is actually missing and if a library that libmysql.dll requires is missing. In both cases, the library cannot be loaded.

While you should of course first make sure that the library can be found (eg by placing it into the same directory as your executable), the usual reason for this problem is that the Visual C++ Redistributable for Visual Studio is missing. It is a prerequirement for libmysql.dll and the MySQL server itself (and a lot of other software), and you need to install this package on the target system.

Optionally, for SSL support, you additionally need OpenSSL libraries . They do not necessarily need to be installed, you can just copy the 2 dlls eg to the same directory as the libmysql.dll .

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