Recent

Author Topic: Missing libmysql.dll  (Read 32199 times)

perhen

  • New Member
  • *
  • Posts: 15
Missing libmysql.dll
« on: April 18, 2012, 10:14:51 pm »
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

  • Administrator
  • Hero Member
  • *
  • Posts: 12118
  • FPC developer.
Re: Missing libmysql.dll
« Reply #1 on: April 18, 2012, 10:20:37 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

  • Hero Member
  • *****
  • Posts: 668
    • exdatis
Re: Missing libmysql.dll
« Reply #2 on: April 19, 2012, 07:12:07 am »
Or put:
ControlPanel->System->EnvironmentVariable->Advanced->Path ->edit; path to mysql bin folder.

perhen

  • New Member
  • *
  • Posts: 15
Re: Missing libmysql.dll
« Reply #3 on: April 19, 2012, 11:24:41 am »
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

  • Hero Member
  • *****
  • Posts: 5740
  • Add to the wiki - it's free ;)
    • FPCUp, PaperTiger scanning and other open source projects
Re: Missing libmysql.dll
« Reply #4 on: April 19, 2012, 12:15:49 pm »
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.
Want quicker answers to your questions? Read http://wiki.lazarus.freepascal.org/Lazarus_Faq#What_is_the_correct_way_to_ask_questions_in_the_forum.3F

Open source including papertiger OCR/PDF scanning:
https://bitbucket.org/reiniero

Lazarus trunk+FPC trunk x86, Windows x64 unless otherwise specified

ferdinand

  • Newbie
  • Posts: 5
Re: Missing libmysql.dll
« Reply #5 on: February 13, 2015, 07:10:44 am »
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 !!!  :D

 

TinyPortal © 2005-2018