Reputation: 149
I'm using Delphi XE5 on Windows 7 64bit and just trying FireDAC component. I'm using one TFDConnection component to connect to local MySQL database (v5.6.15).
I already put the libmysql.dll (32bit v5.6.15) into my Project folder, the EXE folder and C:\Windows\System32 folder (which is PATH location), but when I tried to Connect from the IDE, I encountered an error:
Cannot load vendor library [libmysql.dll or libmysqld.dll]. THe system cannot find the file spcified. Hint: check it is in the PATH or application EXE directories, and has x86 bitness..
I also tried to put the libmysql.dll (64bit v5.6.15) to all those three folders, but still encounter the same error.
Do I miss something to make it connected? Thank you for the help.
Upvotes: 5
Views: 33409
Reputation: 390
Later version of MySQL and Delphi 11: I don't know if it's applicable to the earlier versions.
I didn't have the 2013 VC++ redistributable installed. It gives no hint that is the problem.
"It is necessary to install the Visual C++ Redistributable Packages for Visual Studio 2013 too."
Upvotes: 0
Reputation: 1
I had the same problem with copying database files from my old PC to my new PC. The solution was use Back-up (to a USB drive) from the application on the old PC then open the application on the new PC and select restore from the USB drive.
Upvotes: 0
Reputation: 69
Don't copy dll files to the bin directory as suggested by some others answers. This could potentially interfere with the copy protection mechanism and cause your IDE to vanish without warning, and could upset the license.
Copy the dll files to another location on your path which the IDE (and/or your app) can see.
Upvotes: 2
Reputation: 137
Also experienced the problems described above with Seattle, connecting to a local and remote 64-bit version of MySQL.
Neither placing the 32-bit version of libmysql.dll (obtained from same source as NoName above) in the exe directory or setting the VendorLib property worked.
However, due to an exception thrown on a Windows 7 machine that advised it was unable to load VCRuntime140.dll, I found a copy and placed it in the same directory as libmysql.dll, and this worked.
All I could find about VCRuntime140 online, is it is used by MS Visual Studio. Copies found on machines I've performed a search on, have been in directories belonging to DropBox (this is the one I copied) and OneDrive. I could not find an online resource that satisfactorily explained why it worked or why it would be needed.
Upvotes: 2
Reputation: 11
Had this same problem trying to connect FireDAC to mysql on Berlin 10.1
Mysql managed by WAMPserver64 on a 64-bit Window 10 machine. So I have libmysql.dll {64-bit} located in my WAMP mysql bin folder. Downloaded mysql-connector-c-6.1.6-win32.zip from https://dev.mysql.com/downloads/connector/c/ and put libmysql.dll {32-bit} in SysWOW64, as suggested by NoName
Added the following lines into FDDrivers.ini
[MySQL]
BaseDriverID=MySQL
VendorLibWin32=c:\Windows\SysWOW64\libmysql.dll
VendorLibWin64=c:\wamp64\bin\mysql\mysql5.7.14\lib\libmysql.dll
Upvotes: 1
Reputation: 149
Try to set TFDPhysMySQLDriverLink.VendorLib property to the full path of libmysql.dll and see what the message you will get or the app will connect
Tried the solution based on da-soft comment above, and It works well. Thanks
Upvotes: 3
Reputation: 29
Upvotes: 2
Reputation: 386
xampp
C:\xampp\mysql\lib\libmysql.dll
C:\xampp\mysql\lib\libmysqld.dll
COPY TO
C:\Program Files (x86)\Embarcadero\RAD Studio\12.0\bin
Upvotes: 1