2
votes

I want to use MYSQL in delphi xe10 with fireDAC. So, FDConnection on the form, then input basic information about my mysql db.

But when I try to connect, there is an error "cannot load vendor library libmysql.dll or libmysqld.dll"

I read embaradeco manual and I have been tried 1. copy libMySQL.dll to my “c:\program files (x86)\Embarcadero\Studio\\bin” : fail(That means cannot load db data, still got error) 2. specify path in FDDrivers.ini [MySQL] VendorLib=\libmysql.dll :fail

So, I'm curious what else I have to check. There must be something I missed. Anyone can help?

2
What do you mean by "fail", that you couldn't copy the file, or that you still got the error msg? Anyway, better to copy libMySql.Dll to your project's output directory until you have everything working ok. The forward slash in your VendorLib entry is saying that the dll is in you current drive's root directory, which is not what you want. Btw, this problem may arise if your libmysql.dll is too recent for your Delphi version.MartynA
That means still got same error. I can copy file to the directory as administrator. Thanks you for kind explanation. I have to check some factors, then,randomwalk1225

2 Answers

7
votes

I solved this problem myself.

I got hint from here http://chapmanworld.com/2015/01/18/connecting-radstudio-to-mysql-with-firedac/

First, I should know there are 32bit dll and 64bit dll separately. I used 64bit dll and got error. So, I use 32bit dll I got files from http://dev.mysql.com/downloads/mysql/

Copy it to Program Files(x86)/Embarcadero/Studio/17.0/bin then I got success message.

Additionally, mariaDB also works fine.

**CAUTION In the link, Author doesn't recommend copy file to .../bin directory. But My case, I feel fine till now.

2
votes

I'm the author of that post.

If your IDE appears to vanish from time to time, with out warning or error message, it could be caused by placing that dll in your bin directory. Placing items there appears to trip part of the copy-protection mechanism in the IDE.

I work as technical support to the sales team at Embarcadero, and I can't count the number of times a customer has encountered this IDE vanishing problem, and it turned out a third-party component was installed in the bin directory. (May have been resolved since I posted that, but remains true for older versions at least)