Mysql problem on Xampp

Problems with the Linux version of XAMPP, questions, comments, and anything related.

Mysql problem on Xampp

Postby rrmaverick » 19. November 2008 21:31

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)
rrmaverick
 
Posts: 3
Joined: 19. November 2008 21:26

Postby Wiedmann » 19. November 2008 22:58

but when I try to connect to mysql,

With the shell, a PHP script, a Perl script, ... ?
Wiedmann
AF Moderator
 
Posts: 17102
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

Postby rrmaverick » 20. November 2008 07:14

with the shell using mysql -u username -p
rrmaverick
 
Posts: 3
Joined: 19. November 2008 21:26

Postby Dave_L » 20. November 2008 09:38

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
User avatar
Dave_L
 
Posts: 212
Joined: 23. October 2004 00:43

Postby Wiedmann » 20. November 2008 12:56

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
Wiedmann
AF Moderator
 
Posts: 17102
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

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

Postby rrmaverick » 21. November 2008 07:17

thanks,

that worked.
rrmaverick
 
Posts: 3
Joined: 19. November 2008 21:26

Re: Mysql problem on Xampp

Postby sunandwavs » 29. December 2008 05:47

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?
sunandwavs
 
Posts: 1
Joined: 29. December 2008 05:26

Re: Mysql problem on Xampp

Postby Nobbie » 29. December 2008 11:35

>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.
Nobbie
 
Posts: 13183
Joined: 09. March 2008 13:04


Return to XAMPP for Linux

Who is online

Users browsing this forum: No registered users and 30 guests