Can't connect MySQL (cannot load library libmysql.dll) lazarus / 16-Databases ---------------------------------------------------------------------- kaedusoft · 2022-09-15 13:24 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 · 2022-09-15 13:57 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 · 2022-09-15 14:03 Quote from: dseligo on September 15, 2022, 03:57:44 pmIf 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) 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 · 2022-09-15 14:30 Under Windows exe file is in the same directory as project by default... ---------------------------------------------------------------------- Nicole · 2022-09-16 16:47 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. ---------------------------------------------------------------------- KodeZwerg · 2022-09-16 17:30 Quote from: kaedusoft on September 15, 2022, 03:24:55 pmI 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. step 1: open lazarus step 2: code an application step 3: save your project in its own named folder step 4: compile and run your newly created project step 5: explain "I have tried everything but it doesn't work." in steps we can reproduce and with information about "Error". "not work" is no error descripton. Thanks and happy coding