0
votes

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

1
Use Depency walker to see which dependencies you are missing on the target hostwhosrdaddy

1 Answers

1
votes

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 (e.g. 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 e.g. to the same directory as the libmysql.dll.