Forum > Databases

Can't connect MySQL (cannot load library libmysql.dll)

(1/2) > >>

kaedusoft:
I am trying to connect my Lazarus application to MySQL. I have tried everything but it doesn't work. Could someone tell me how to do it step by step? I am working on Windows 10. Thank you very much.

dseligo:
If you get this error you probably have database components set.

Try this:
1. Put libmysql.dll in your program's directory.
2. Make sure that bitness of your program matches bitness of libmysql.dll (i.e. if your program is 64 bit, libmysql.dll also has to be 64 bit)

Zvoni:

--- Quote from: dseligo on September 15, 2022, 03:57:44 pm ---If you get this error you probably have database components set.

Try this:
1. Put libmysql.dll in your program's directory.
2. Make sure that bitness of your program matches bitness of libmysql.dll (i.e. if your program is 64 bit, libmysql.dll also has to be 64 bit)

--- End quote ---
That is if he's actually saved the Project there.
If he just fired up Lazarus, and entered some testcode, the dll in that place won't help him, since the scope the program is running in is the Lazarus-IDE itself,
(or maybe better said: the temporary "working directory" Lazarus created for the testrun. Not sure about that)

jcmontherock:
Under Windows exe file is in the same directory as project by default...

Nicole:
So if there is no quick hint here, translate this page:
https://lazarus.intern.es/firebird_lazarus_beachten.html

Do not get irritated by Zeos and Firebird.
The reason of the problems may be the same.

Navigation

[0] Message Index

[#] Next page

Go to full version