I am using Fedora Core 6, MySQL 5.0.27 and Lazarus 0.9.20 and I have been working on the MySQL tutorial for Lazarus
http://wiki.lazarus.freepascal.org/MySQLDatabases I have the entire tutorial saved and it compiles with no problems (I am using "TMySQL50Connection"). During run-time I enter "localhost" for the Host input and "root" for the Username input. I leave the Password input Empty (because that is how my MySQL root user is set). When I click the "Connect to server" button I get the following error:
Can not load MySQL library "libmysqlclient.so" Please check your installation.
The first time I encountered this error I realized I did not have the mysql-devel package installed, which contains libmysqlclient.so. After installing it I got the same error. Then I searched the Lazarus forum and saw a recommendation to add these symbolic links in /usr/lib. I checked to make sure libmysqlclient.so was in /usr/lib (it was) and then did:
ln -s libmysqlclient.so.15.0.0 lmysqlclient
ln -s libmysqlclient.so.15.0.0 libmysqlclient.so
ln -s libmysqlclient.so.15.0.0 mysqlclient
This did not help. I got the same error. So I added the paths:
ln -s /usr/lib/libmysqlclient.so.15.0.0 /usr/lib/lmysqlclient
ln -s /usr/lib/libmysqlclient.so.15.0.0 /usr/lib/libmysqlclient.so
ln -s /usr/lib/libmysqlclient.so.15.0.0 /usr/lib/mysqlclient
This did not help, same error.
I read about getting MySQL to work for FPC in text mode.
http://lazarus-ccr.sourceforge.net/index.php?wiki=LazarusDatabase Among other things it suggested adding a line to /etc/fpc.cfg to point to my libraries:
-Fl/lib;/usr/lib
I did this and got the same error!
I am hoping that someone knows what I am doing wrong and would be kind enough to help me fix this problem.
Thanks,
-Bob