Problem connecting to xampp through lazarus lazarus / 16-Databases ---------------------------------------------------------------------- jaggerdan · 2010-11-28 19:30 Hello all, I have lazarus installed on ubuntu 9.10 and cannot connect to xampp (embedded with mysql 5.0) web server.  I am using the correct sqldb component (mysql50connection).  I can do everything with mysql through the bash shell so I know mysql is installed properly.  I put mysql monitor(client), socket, library (/opt/lampp/.. ) in the $PATH on ubuntu.  It all works properly EXCEPT when I try to connect to it using lazarus (I get the typical 'cannot find libmsqlclient.so.15' error).  As a test, I got rid of xampp and installed mysql-server 5.0 from the Synaptic Package Manager.  It works great that way, however, I need to use xampp because this app will be used on another machine that uses this same xampp version (xampp-linux 1.6.8a with embedded mysql 5.0). Is there anyone out there that can help me with this?  Maybe I need to set some environment or path etc. options in lazarus?? ---------------------------------------------------------------------- Leledumbo · 2010-11-29 02:19 See what version of mysql that xampp uses, i.e. what libmysqlclient.so.X does it register? If you've found it out, you can actually symlink it to what your app depends on (assuming there's no API changes between those version that might affect your programs). ---------------------------------------------------------------------- jaggerdan · 2010-11-29 02:27 Quote from: Leledumbo on November 29, 2010, 03:19:37 amSee what version of mysql that xampp uses, i.e. what libmysqlclient.so.X does it register? If you've found it out, you can actually symlink it to what your app depends on (assuming there's no API changes between those version that might affect your programs). Hello Lelodumbo The xampp version I'm using uses libmysqlclient.so.15 I actually put the executable in the same folder with the lib file it's looking for and it still will not connect ---------------------------------------------------------------------- Leledumbo · 2010-11-29 02:31 QuoteThe xampp version I'm using uses libmysqlclient.so.15 I actually put the executable in the same folder with the lib file it's looking for and it still will not connectLinux doesn't use the same technique as Windows to link dynamic libraries (or even to run executables by double clicking). The path is either static (/usr/lib) or has to be added to ld.so.conf and re-run ldconfig after that. ---------------------------------------------------------------------- jaggerdan · 2010-11-29 02:38 Quote from: Leledumbo on November 29, 2010, 03:31:34 amQuoteThe xampp version I'm using uses libmysqlclient.so.15 I actually put the executable in the same folder with the lib file it's looking for and it still will not connectLinux doesn't use the same technique as Windows to link dynamic libraries (or even to run executables by double clicking). The path is either static (/usr/lib) or has to be added to ld.so.conf and re-run ldconfig after that. Sorry I mis-quoted, it is a linux app running lazarus on linux ubuntu.  I will look at the id.so.conf file (if I can find it).  As far as I know xampp installs all it's files under /opt/lampp (including any newly created databases ie: /opt/lampp/var/mysql/mynewdatabase).  I think that's where the problem is. ---------------------------------------------------------------------- jaggerdan · 2010-11-29 03:45 Quote from: Leledumbo on November 29, 2010, 03:31:34 amQuoteThe xampp version I'm using uses libmysqlclient.so.15 I actually put the executable in the same folder with the lib file it's looking for and it still will not connectLinux doesn't use the same technique as Windows to link dynamic libraries (or even to run executables by double clicking). The path is either static (/usr/lib) or has to be added to ld.so.conf and re-run ldconfig after that. Sorry Leledumbo I mis quoted again. It's a linux app CREATED with lazarus on ubuntu.  The setup that connects (see above) puts my newly created database/tables in ' /var/lib/mysql/newdatabase'.  The setup that does not connect (xampp) creates the new database/table in '/opt/lampp/var/mysql/newdatabase'.  With both setups, I created the databases with the supplied 'phpmyadmin' using localhost.  I'm getting really tired of reinstalling ubuntu for a fresh experiment each time so I hope someone has an idea how to help me correct this . Thanks for any additional help. ---------------------------------------------------------------------- jaggerdan · 2010-12-02 01:59 Quote from: jaggerdan on November 29, 2010, 04:45:15 amQuote from: Leledumbo on November 29, 2010, 03:31:34 amQuoteThe xampp version I'm using uses libmysqlclient.so.15 I actually put the executable in the same folder with the lib file it's looking for and it still will not connectLinux doesn't use the same technique as Windows to link dynamic libraries (or even to run executables by double clicking). The path is either static (/usr/lib) or has to be added to ld.so.conf and re-run ldconfig after that. I have an update!  I can connect to the xampp webserver!  It turns out all i needed to do was create a symlink to the library files of xampp.  These are not stored where lazarus and SQLdb expects to find them.  The link is as follows: ln -s /opt/lampp/lib/mysql/libmysqlclient.so /usr/lib/libmysqlclient.so Problem solved.