Recent

Author Topic: Lazarus - MYSQL - MacOS  (Read 7623 times)

yusufc

  • Newbie
  • Posts: 5
Lazarus - MYSQL - MacOS
« on: January 04, 2011, 10:33:29 pm »
Hello Friends,

I am trying to connect MYSQL database on my website.
My OS version is : MAC OS X 10.6.5
My FPC Version is : 2.4.2
My Lazarus version is : 0.9.31

I formatted my mac :) I installed apple developer tools, fpc,fpcsrc, lazarus and standard sqldb component.
I dont installed any mysql client (?)

When I use MYSQL50Connection component I'm getting this error message : "Cannot load default mysql library (libmysqlclient.dylib.15 or libmysqlclient.dylib) Check your installation"

Should I install a "mysql client" on my mac ?
Because I want to connect a MYSQL database ON MY WEBSITE ...

Thank you for your response, sorry for bad english, have a nice day.

Phil

  • Hero Member
  • *****
  • Posts: 2737
Re: Lazarus - MYSQL - MacOS
« Reply #1 on: January 04, 2011, 10:40:58 pm »
Is that a design-time or run-time error?

You probably need the MySql library installed for any use of that component, whether design or runtime.

I would just follow the instructions and install the client on your Mac and see if that makes any difference.

Thanks.

-Phil

yusufc

  • Newbie
  • Posts: 5
Re: Lazarus - MYSQL - MacOS
« Reply #2 on: January 04, 2011, 10:50:01 pm »
Thanks,
When I change "connected" property to "True" I am getting this error message. (it is design time error)
And I installed MySQL Connector/odbc (mysql-connector-odbc-5.1.8-osx10.6-x86-64bit.dmg).
But I don't know. This connector may not for me.

Can you give direct link for "mysql client for mac" ?

Is client equals to connector ? I dont know :(

Phil

  • Hero Member
  • *****
  • Posts: 2737
Re: Lazarus - MYSQL - MacOS
« Reply #3 on: January 04, 2011, 10:59:36 pm »
You need the .dylib library specified in the error message. Look in /usr/lib to see if you have it. If not, you need to install it. Looks like .dmg's for doing that are here:

http://dev.mysql.com/

Remember that a component's code is still running even in design mode, so it probably is trying to connect just like it would at runtime.

Also, Sqlite is installed on every Mac (and iPhone, iPad, iPod touch) is that's of interest to you instead of MySql. I've never used MySql.

Thanks.

-Phil

yusufc

  • Newbie
  • Posts: 5
Re: Lazarus - MYSQL - MacOS
« Reply #4 on: January 09, 2011, 09:31:40 pm »
Hello friends,

I connected to MYSQL database, from MacOS X 10.6.5 with Lazarus :)

I downloaded MYSQL DATABASE SERVER 5.0.91 fromhttp://downloads.mysql.com/archives.php

(Yes, my mysql databaese server  on the internet, I don't need to mysql database server, I need only c libraries, but I can not found c libraries for mysql 5.0 from mysql.com.)

I extracted mysql-5.0.91-osx10.4-i686.tar, then I copied libmysqlclient.dylib from lib directory to Mac's lib/usr directory. And recompiled to lazarus.

And result is success.

Thank you ...

 

TinyPortal © 2005-2018