Recent

Author Topic: How to connect to MySQL 5.1  (Read 20872 times)

thaimann

  • Jr. Member
  • **
  • Posts: 84
How to connect to MySQL 5.1
« on: July 24, 2010, 09:03:01 pm »
I have Lazarus 0.9.29 installed on a FC12 Laptop, with Zeos 6.6.6 installed.  What do I need to do to connect to a MySQL 5.1 Server?

a.atalla

  • Jr. Member
  • **
  • Posts: 82
Lazarus 1.0.8 | FPC 2.6.2 x64  | Arch Linux x64 | Windows 7-x86

thaimann

  • Jr. Member
  • **
  • Posts: 84
Re: How to connect to MySQL 5.1
« Reply #2 on: July 25, 2010, 04:29:40 pm »
I have gone in and added “/usr/lib/mysql

I have dropped a Zconnection on my form and set values for Database, user, & password.
I then set protocal to one of the following:

mysql
mysql-5
mysqld-5

and then tried to change Connected to true and got the following error messages.

mysql:      None of the dynamic libraries can be found: libmysqlclient.so.15, libmysqlclient.so
mysql-5:           None of the dynamic libraries can be found: libmysqlclient.so.15, libmysqlclient.so
mysqld-5:   None of the dynamic libraries can be found: libmysqld.so   

I don't know what is wrong. 

thaimann

  • Jr. Member
  • **
  • Posts: 84
Re: How to connect to MySQL 5.1
« Reply #3 on: July 25, 2010, 04:31:30 pm »
The above first line should read:

I have gone in and added “/usr/lib/mysql to my Path.

Mujie

  • Jr. Member
  • **
  • Posts: 64
Re: How to connect to MySQL 5.1
« Reply #4 on: July 25, 2010, 05:53:22 pm »
@thaimann : Are you sure you have the mysql server and mysql client in your operating system?

thaimann

  • Jr. Member
  • **
  • Posts: 84
Re: How to connect to MySQL 5.1
« Reply #5 on: July 25, 2010, 07:42:34 pm »
I think so:

yum list installed | grep mysql
mysql.i686          5.1.42-7.fc12   @updates                                   
mysql-embedded.i686 5.1.42-7.fc12   @updates                                   
mysql-libs.i686     5.1.42-7.fc12   @updates                                   
mysql-server.i686   5.1.42-7.fc12   @updates                                   
php-mysql.i686      5.3.2-1.fc12    @updates                                   
qt-mysql.i686       1:4.6.2-20.fc12 @updates

if I do an ls on /usr/lib/mysql:

ls -l /usr/lib/mysql
total 12740
lrwxrwxrwx 1 root root      26 2010-02-20 16:27 libmysqlclient_r.so.16 -> libmysqlclient_r.so.16.0.0
-rwxr-xr-x 1 root root 1530468 2010-01-29 12:08 libmysqlclient_r.so.16.0.0
lrwxrwxrwx 1 root root      24 2010-02-20 16:27 libmysqlclient.so.16 -> libmysqlclient.so.16.0.0
-rwxr-xr-x 1 root root 1521184 2010-01-29 12:08 libmysqlclient.so.16.0.0
lrwxrwxrwx 1 root root      18 2010-02-20 16:28 libmysqld.so.0 -> libmysqld.so.0.0.1
-rwxr-xr-x 1 root root 8882504 2010-01-29 12:08 libmysqld.so.0.0.1
lrwxrwxrwx 1 root root      21 2010-02-20 16:27 libndbclient.so.3 -> libndbclient.so.3.0.0
-rwxr-xr-x 1 root root 1075896 2010-01-29 12:08 libndbclient.so.3.0.0
-rwxr-xr-x 1 root root   13127 2010-01-29 12:07 mysqlbug
-rwxr-xr-x 1 root root    6356 2010-01-29 12:07 mysql_config
drwxr-xr-x 2 root root    4096 2010-02-20 16:28 plugin

thaimann

  • Jr. Member
  • **
  • Posts: 84
Re: How to connect to MySQL 5.1
« Reply #6 on: August 01, 2010, 12:37:25 am »
Problem has been solved.  The Source Directory for Zeos needs to be in the path.

TH

ramirezrocha

  • Newbie
  • Posts: 1
Re: How to connect to MySQL 5.1
« Reply #7 on: November 11, 2010, 12:23:59 pm »
Problem has been solved.  The Source Directory for Zeos needs to be in the path.

TH

Hi! got the same problem, thanks for your help...

Where I put the directory of Zeos? First time using lazarus and the zeoslib...

jaggerdan

  • New Member
  • *
  • Posts: 14
Re: How to connect to MySQL 5.1
« Reply #8 on: November 30, 2010, 06:46:24 am »
Problem has been solved.  The Source Directory for Zeos needs to be in the path.

TH

Hello thaimann
Am I to understand this correctly?  You actually got lazarus to connect to mysql 5.1 using the zeos componants???  Just by putting the zeos source dir in the path?  Several people on this forum (including myself) have tried this.  I think some were able to do it with windows but have seen none do it using a linux distro.  What OS are you using on that laptop?

cjhs22a

  • Newbie
  • Posts: 6
Re: How to connect to MySQL 5.1
« Reply #9 on: November 30, 2010, 04:24:18 pm »
I am able to connect to MySQL 5.1 with Lazarus on a linux x86_64 Fedora 13 distro using zeos. I have the following versions installed:

lazarus-0.9.28-0.x86_64
fpc-2.2.4-0.x86_64
mysql-devel-5.1.52-1.fc13.x86_64
zeosdbo-7.0.0-alpha

I had to create a symbolic link for libmysqlclient.so in /usr/lib64 to libmysqlclient.so.16.0.0

Craig

jaggerdan

  • New Member
  • *
  • Posts: 14
Re: How to connect to MySQL 5.1
« Reply #10 on: December 01, 2010, 05:37:42 am »
I am able to connect to MySQL 5.1 with Lazarus on a linux x86_64 Fedora 13 distro using zeos. I have the following versions installed:

lazarus-0.9.28-0.x86_64
fpc-2.2.4-0.x86_64
mysql-devel-5.1.52-1.fc13.x86_64
zeosdbo-7.0.0-alpha

I had to create a symbolic link for libmysqlclient.so in /usr/lib64 to libmysqlclient.so.16.0.0

Craig

Hello Craig,
Thanks for the info.  I think getting the Symlinks right is the secret.  Or maybe I should be using Fidora  ::)

jmLandsvik

  • New Member
  • *
  • Posts: 29
Re: How to connect to MySQL 5.1
« Reply #11 on: April 11, 2011, 12:54:38 pm »
Hi All..

hmmm,
I read about this topic elsewhere, and it was dated 2009 (I think(yes))
This topic is dated 2010. (yes, latish)

And NOW, we are soon mid 2011, and I'm on .9.30...

And still mySQL 5.1.x is NOT working with Lazarus?

should I be concerned, or is this to be expected by an "up to date" software!

regz.

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 11382
  • FPC developer.
Re: How to connect to MySQL 5.1
« Reply #12 on: April 11, 2011, 01:39:54 pm »
hmmm,
I read about this topic elsewhere, and it was dated 2009 (I think(yes))
This topic is dated 2010. (yes, latish)

First and for all, this is mysql's fault, for constantly breaking compatibility.

We can't simply say "all mysql 5.x versions are compatible" in advance, we actually have to wait till a point release is out, sufficiently tested, and then we can also allow the sqlconnection of "5" to load "5.1". Since it might as well be not compatible at all.

The smartest way to avoid this nonsense is to
(1) avoid mysql if you can.
(2) be reluctant with upgrading without a very good reason.

Quote
And NOW, we are soon mid 2011, and I'm on .9.30...

And still mySQL 5.1.x is NOT working with Lazarus?

This thread started in July 2010. Free Pascal 2.4.2 went into freeze in May 2010, and while the 5.1 problem was known very shortly before this happened, it was deemed too intrusive to merge the last minute.

FPC 2.4.4 will have it, and building for it has started. (will take a few weeks), and I assume lazarus will follow suite shortly after.

Quote
should I be concerned, or is this to be expected by an "up to date" software!

Your anger is directed in the wrong direction. MySql keeps the situation confused deliberately to sell their commercial product.

The free version is essentially unsupportable, and can be considered crippleware.
 

jmLandsvik

  • New Member
  • *
  • Posts: 29
Re: How to connect to MySQL 5.1
« Reply #13 on: April 11, 2011, 01:50:26 pm »
Marcov:
tnx. for reply...

hmmm, oki...
Well, I was using mySQL cus of xampp...

oki, maybe I'll find smt. about 5.1 not working in the release news.

I'm not in "anger", just frustrated...
Is there no way of "reporting" that this is NOT going to work, in the modules. or make them "grey"....with a hint that says "NOT working for the moment!" ? :O)

regards

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 11382
  • FPC developer.
Re: How to connect to MySQL 5.1
« Reply #14 on: April 11, 2011, 02:18:42 pm »
I'm not in "anger", just frustrated...

Join the club. Mysql is frustrating us for over 10 years now :-)

Quote
Is there no way of "reporting" that this is NOT going to work, in the modules. or make them "grey"....with a hint that says "NOT working for the moment!" ? :O)

Which modules, what where when? There is no 5.1 module in 2.4.2, so nothing to grey?

 

TinyPortal © 2005-2018