Recent

Author Topic: Problem connecting to xampp through lazarus  (Read 8969 times)

jaggerdan

  • New Member
  • *
  • Posts: 14
Problem connecting to xampp through lazarus
« on: November 28, 2010, 08:30:32 pm »
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

  • Hero Member
  • *****
  • Posts: 8757
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: Problem connecting to xampp through lazarus
« Reply #1 on: November 29, 2010, 03:19:37 am »
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

  • New Member
  • *
  • Posts: 14
Re: Problem connecting to xampp through lazarus
« Reply #2 on: November 29, 2010, 03:27:57 am »
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).
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

  • Hero Member
  • *****
  • Posts: 8757
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: Problem connecting to xampp through lazarus
« Reply #3 on: November 29, 2010, 03:31:34 am »
Quote
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
Linux 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

  • New Member
  • *
  • Posts: 14
Re: Problem connecting to xampp through lazarus
« Reply #4 on: November 29, 2010, 03:38:44 am »
Quote
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
Linux 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

  • New Member
  • *
  • Posts: 14
Re: Problem connecting to xampp through lazarus
« Reply #5 on: November 29, 2010, 04:45:15 am »
Quote
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
Linux 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

  • New Member
  • *
  • Posts: 14
Re: Problem connecting to xampp through lazarus
« Reply #6 on: December 02, 2010, 02:59:18 am »
Quote
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
Linux 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.
« Last Edit: December 02, 2010, 03:16:07 am by jaggerdan »

 

TinyPortal © 2005-2018