Page 1 of 1

Mysql problem on Xampp

PostPosted: 19. November 2008 21:31
by rrmaverick
Hi,

I have installed Xampp on ubuntu 8.04. The installation ran smoothly but when I try to connect to mysql, I get the following error

ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)

PostPosted: 19. November 2008 22:58
by Wiedmann
but when I try to connect to mysql,

With the shell, a PHP script, a Perl script, ... ?

PostPosted: 20. November 2008 07:14
by rrmaverick
with the shell using mysql -u username -p

PostPosted: 20. November 2008 09:38
by Dave_L
That's the error I get if the MySQL service is not running.

Check whether services are running:
# /opt/lampp/lampp status

Start services:
# /opt/lampp/lampp start

PostPosted: 20. November 2008 12:56
by Wiedmann
with the shell using mysql -u username -p

This command is using the MySQL client from your OS, and not the MySQL client from XAMPP.

You must use:
Code: Select all
/opt/lampp/bin/mysql -u username -p


or:
Code: Select all
cd /opt/lampp/bin
./mysql -u username -p

/opt/lampp/bin/mysql -u username -p

PostPosted: 21. November 2008 07:17
by rrmaverick
thanks,

that worked.

Re: Mysql problem on Xampp

PostPosted: 29. December 2008 05:47
by sunandwavs
Thank you Wiedmann, your answer worked for me also. On a guest F10 (via VBOX), I am trying to get Drupal up. My PATH is currently:
Code: Select all
[drupal@localhost bin]$ whereis mysqladmin
mysqladmin: /usr/bin/mysqladmin /opt/lampp/bin/mysqladmin /usr/share/man/man1/mysqladmin.1.gz


Is changing PATH to look in /opt/lampp/bin/ first a good decision or will that lead to other glitches?

Re: Mysql problem on Xampp

PostPosted: 29. December 2008 11:35
by Nobbie
>Is changing PATH to look in /opt/lampp/bin/ first a good decision or will that lead to other glitches?

You should not change the PATH, instead you should delete all software components which already have been installed by your linux installation and which you decided not to use and instead use the Xampp Package. That means, look out for Apache, MySQL und PHP local installation and de-install them properly.

This is by far better than struggling with different versions of the same software.