Missing libmysql.dll lazarus / 16-Databases ---------------------------------------------------------------------- perhen · 2012-04-18 20:14 Hi Today I was excited to find Lazarus. I had it installed right away. I got problems when I tried to connect to a MySQL database. I am using a MySQL50Connenction, server: localhost, database: test, proper username and password. But when I try to change Connect to true, I get the errormessage "Cannot load default MySQL library (libmysql.dll)". But that file exists several places. Hoping for help. Per ---------------------------------------------------------------------- marcov · 2012-04-18 20:20 Quote from: perhen on April 18, 2012, 10:14:51 pm Today I was excited to find Lazarus. I had it installed right away. I got problems when I tried to connect to a MySQL database. I am using a MySQL50Connenction, server: localhost, database: test, proper username and password. But when I try to change Connect to true, I get the errormessage "Cannot load default MySQL library (libmysql.dll)". But that file exists several places. Can be related to three problems: (1) make sure that dll and your generated EXE are either both 32-bit or both 64-bit (2) put the DLL in the application directory (3) The same error might also happen  if that dll is found, but some other DLLs that libmysql.dll depends on are not. Copy _all_ dlls from the mysql-client distro to your app dir. ---------------------------------------------------------------------- exdatis · 2012-04-19 05:12 Or put: ControlPanel->System->EnvironmentVariable->Advanced->Path ->edit; path to mysql bin folder. ---------------------------------------------------------------------- perhen · 2012-04-19 09:24 Hi Thanks. I appreciate your comments. I copied the dll-file to the Lazarus dirctory, and I got the message "wrong version". I am running MySQL5.5 and TMySQL...50. Is there a TMySQL...55 component out there or should I go back to MySQL version 5.0? Per ---------------------------------------------------------------------- BigChimp · 2012-04-19 10:15 Might be a good idea to search the forum... IIRC, there is a MySQL 5.5 component in current trunk, but don't know when it was added. ---------------------------------------------------------------------- ferdinand · 2015-02-13 06:10 I know the original post was three years ago but I have read it until now and I have the answer. The Lazarus project's target CPU, the libmysql.dll and the MySQL Server, all must be of the same architecture, either 32 or 64 bits. You find the libmysql.dll file in the MySQL Community Server and must copy it in the same folder of the project. Cheers !!!