Cannot load MySQL library ("libmysqlclient.so.15" lazarus / 16-Databases ---------------------------------------------------------------------- Rayson · 2010-10-25 23:27 I am attempting to connect to a MySQL 5.1.37 database on my Ubuntu 10.04 64 bit machine. I get the message >> Cannot load MySQL library ("libmysqlclient.so.15" or "libmysqlclient.so")... If I do a Quoteray@GigabyteLucid:/usr/lib$ sudo ldconfig -v |grep mysql /sbin/ldconfig.real: Can't stat /lib/x86_64-linux-gnu: No such file or directory /sbin/ldconfig.real: Can't stat /usr/lib/x86_64-linux-gnu: No such file or directory         libmysqlclient_r.so.16 -> libmysqlclient_r.so.16.0.0         libmysqlclient.so.16 -> libmysqlclient.so.16.0.0You can see what I get above. Apparently I have so.16 instead of so.15. What do I need to do where? This being a 64 bit machine, I have both a /usr/lib64/mysql/ and also a /usr/lib/mysql/ directory. I am running Lazarus Version #: 0.9.28.2-8ubuntu1.beta Date: 2010-03-04 FPC Version 2.4.0 I have SQLDBLaz Version 1.0.1 and DBFLaz Version 0.1.1 packages. All help would be appreciated as I have been looking all over for something that solves this problem or provides a Tutorial or example that will actually run on my configuration. Thanks, Ray ---------------------------------------------------------------------- xenblaise · 2010-10-26 00:05 Start your MySQL server by using the command: /etc/rc.d/init.d/mysql start Check if it is working ---------------------------------------------------------------------- Rayson · 2010-10-26 00:31 I get a command not found message when I run the command sudo /etc/rc.d/init.d/mysql start however I am quite sure the MySQL server is running as my Apache2 server is serving MySQL intensive pages and Webmin says it is running and I can log in with MySQL Query Browser. Ray ---------------------------------------------------------------------- xenblaise · 2010-10-26 02:12 Did you manually install the mysql server? or its the system that has a installed mysql server? use the installed. to be sure that your mysql is running fine, try to connect in the console mode using the mysql console commands ---------------------------------------------------------------------- Rayson · 2010-10-26 14:09 I did a manual install of the server with Quotesudo apt-get install apache2-mpm-prefork libapache2-mod-php5 mysql-server foomatic-filters  mysql-admin mysql-query-browser php5-gpib php5-suhosin php5-gd php5-mysql I can vet into the MySQL Monitor with: Quoteray@GigabyteLucid:/usr/bin$ mysql -h localhost -u root -p Enter password: Welcome to the MySQL monitor.  Commands end with ; or \g. Your MySQL connection id is 410 Server version: 5.1.41-3ubuntu12.6 (Ubuntu) Could the problem be that Lazarus is looking for libmysqlclient.so.15 and I have libmysqlclient.so.16? If so, what can I do about that? Ray ---------------------------------------------------------------------- bobo · 2010-10-26 14:49 Just create a symlink next to the libmysqlclient.so.16  with the name libmysqlclient.so pointing to the libmysqlclient.so.16 ---------------------------------------------------------------------- Rayson · 2010-10-26 16:51 Wonderful! I set up the symbolic link in /usr/lib64 as you say and can now connect to my MySQL database with the MySQL50Connection. Thanks! now I need to figure out how to see the existing data in the database. Ray ---------------------------------------------------------------------- bobo · 2010-10-26 18:23 If all fails, you can use ZEOSlib from http://zeos.firmos.at/portal.php and compare what is the problem. ---------------------------------------------------------------------- Rayson · 2010-10-27 01:02 So how do I use ZEOSlib? Is there instructions someplace on how to install and use the components? I have downloaded version ZEOSDBO-6.6.6. I got hung up with the MySQL components although I could get MySQL50Connection to connect to my database but I can never get any data through it. I could sure use some help getting 64 bit Linux Ubuntu Lazarus to work with my MySQL 5.1 database. I am not the brightest guy around on this stuff and have spent days with this. Ray ---------------------------------------------------------------------- jaggerdan · 2010-10-27 23:57 Ray, I am in the same place as you.  Very frustrated that I cannot connect to my mysql database.  I have the same setup as your's.  I've done extensive research on the web for a week now to to find a solution; no luck.   I'm a noobe to anything linux but have determined mysql 5.0 uses libmysqlclient.so.15 and mysql 5.1 needs libmysqlclient.so.16.   mysql 5.1 is not compatible with Lazarus/ sqldb componants (Mysql50connection).  I've also tried zeoslib 6.6.6 and even the new version 7.  It still ask for libmysqlclient.so.15   I don't know what to do at this point.  I'm thinking of going back to Windows and Delphi. [/quote] ---------------------------------------------------------------------- bobo · 2010-10-28 02:21 libmysqlclient.so symlink to the .15 or .16 so should fix this. Also for the ZeosConnection I use: Code: [Select]var SQLConnection: TZConnection; . . .       SQLConnection.Properties.Text :=         'character_set_client=utf8'#13#10+         'character_set_connection=utf8'#13#10+         'character_set_database=utf8'#13#10+         'character_set_results=utf8'#13#10+         'character_set_server=utf8'#13#10+         'character_set_system=utf8'#13#10+         'collation_connection=utf8_general_ci'#13#10+         'collation_database=utf8_general_ci'#13#10+         'collation_server=utf8_general_ci'#13#10+         'Codepage=utf8';        SQLConnection.HostName := IPAddr;        SQLConnection.Database := dbname;        SQLConnection.User := username;        SQLConnection.Password := pwd;        SQLConnection.Protocol := 'mysql-5';        SQLConnection.Connected := true;//check if connection is working But first you should try to connect with the mysql command line tool and see if that works. >mysql -u username -p