Recent

Author Topic: mysql 5.5 / libmysql.dll couldnt be loaded  (Read 10321 times)

Roque

  • New Member
  • *
  • Posts: 11
mysql 5.5 / libmysql.dll couldnt be loaded
« on: October 15, 2014, 02:50:29 pm »
HI , I´m trying to do a simple app using mysql ,  I have installed mysql on win7 32  already tryied to copy libmysql.dll from C:\Program Files\MySQL\MySQL Workbench 6.2 CE to C:\Windows\System32 and also  tryied to copy libmysql.dll from  C:\Program Files\MySQL\MySQL Server 5.5\lib to C:\Windows\System32  but still get the same error .. libmysql.dll couldnt be loaded/ found

Thank you
Roque

minesadorada

  • Sr. Member
  • ****
  • Posts: 452
  • Retired
Re: mysql 5.5 / libmysql.dll couldnt be loaded
« Reply #1 on: October 15, 2014, 04:05:35 pm »
Try copying libmysql.dll to the same folder as your application/project
GPL Apps: Health MonitorRetro Ski Run
OnlinePackageManager Components: LazAutoUpdate, LongTimer, PoweredBy, ScrollText, PlaySound, CryptINI

Roque

  • New Member
  • *
  • Posts: 11
Re: mysql 5.5 / libmysql.dll couldnt be loaded
« Reply #2 on: October 15, 2014, 04:47:49 pm »
thank you now .. can´t run a query the error says the dataset is inactive ...  it inactive because i can´t open/ active  de query

I get the message that the query is closed  and get the inactive error on SQLQuery1.First;   


procedure TForm1.Button1Click(Sender: TObject);
var
msg: String;
erro :Boolean;
begin
  erro:=false;
   msg:='ok ';
  MySQLConn.Connected:=true;
  if MySQLConn.Connected  then
     SQLTransaction1.Active:=true
  else
  begin
    erro:=true;
    msg:='MySQLConn not connected .!';
  end;

  if erro=false then
  begin
      if SQLTransaction1.Active then
        SQLQuery1.Active:=true
      else
      begin
       erro:=true;
       msg:='SQLTransaction1 not active .!';
         end;
  end;

  if erro=false then
  begin
      if not SQLQuery1.Active then
     begin
      erro:=true;
      msg:='SQLQuery1 not active ...!';
     end;
  end;

  if (erro) then
   MessageDlg('Error',msg ,mtError,[mbOK],0);


   SQLQuery1.First;
end; 

minesadorada

  • Sr. Member
  • ****
  • Posts: 452
  • Retired
Re: mysql 5.5 / libmysql.dll couldnt be loaded
« Reply #3 on: October 15, 2014, 04:53:10 pm »
Just a tip:

If the original problem (can't load dll) is solved, then mark your first post (Solved) and start a new topic with your new problem.  It makes it easier and faster to get an answer.
GPL Apps: Health MonitorRetro Ski Run
OnlinePackageManager Components: LazAutoUpdate, LongTimer, PoweredBy, ScrollText, PlaySound, CryptINI

Roque

  • New Member
  • *
  • Posts: 11
Re: mysql 5.5 / libmysql.dll couldnt be loaded
« Reply #4 on: October 15, 2014, 05:12:13 pm »
ok , but it will lose the "problem history" ...

Roque

  • New Member
  • *
  • Posts: 11
Re: mysql 5.5 / libmysql.dll couldnt be loaded
« Reply #5 on: October 15, 2014, 05:13:45 pm »
... where is that magic "solved" button ?

minesadorada

  • Sr. Member
  • ****
  • Posts: 452
  • Retired
Re: mysql 5.5 / libmysql.dll couldnt be loaded
« Reply #6 on: October 15, 2014, 05:35:32 pm »
... where is that magic "solved" button ?
In your original post, click the 'Modify' button and edit the title.

I suggested a new topic because your new problem seems unrelated to the original one, so the topic history could be misleading.

Just trying to help...
GPL Apps: Health MonitorRetro Ski Run
OnlinePackageManager Components: LazAutoUpdate, LongTimer, PoweredBy, ScrollText, PlaySound, CryptINI

fengyun

  • Newbie
  • Posts: 6
Re: mysql 5.5 / libmysql.dll couldnt be loaded
« Reply #7 on: October 25, 2014, 03:08:16 pm »
Copy libmysql.dll to path of your project,And Copy libmysql.dll to path of lazarus

exdatis

  • Hero Member
  • *****
  • Posts: 668
    • exdatis
Re: mysql 5.5 / libmysql.dll couldnt be loaded
« Reply #8 on: October 25, 2014, 03:10:31 pm »
Set environment variable -> path(system->advanced system settings...) path of 'bin' folder.
« Last Edit: October 25, 2014, 03:12:50 pm by exdatis »

BigChimp

  • Hero Member
  • *****
  • Posts: 5740
  • Add to the wiki - it's free ;)
    • FPCUp, PaperTiger scanning and other open source projects
Re: mysql 5.5 / libmysql.dll couldnt be loaded
« Reply #9 on: October 25, 2014, 03:16:59 pm »
Set environment variable -> path(system->advanced system settings...) path of 'bin' folder.
Exactly. That's the easiest way of doing this on a development system: you won't end up with a huge amount of copies of the same dll for each Lazarus program that uses a database...
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

 

TinyPortal © 2005-2018