XAMPP [error 2002] - Can't connect to local MySQL server through mysql.sock

Installing, Configuring, Troubleshooting server daemons such as Web and Mail

XAMPP [error 2002] - Can't connect to local MySQL server through mysql.sock

Postby kotsoskorg » 2010/03/05 00:25:58

Hi friends!
I m glad giving a helpfull hand, as have already took so many without giving nothing back!


PROBLEM
-----------

The XAMPP presents the following problem:
When you have installed the basic MySQL from your reposiroty or your /media dvd when formating
and you try to install ΧΑΜPP you will probably see the message trying to enter MySQL:


[error 2002] - Can't connect to local MySQL server through socket /var/lib/mysql/mysql.sock

SOLUTION
------------

The basic MySQL deamon must stop and close permanently forever


service mysqld stop
chkconfig mysqld off

Start your xampp.
Now, the real mysql.sock file which the XAMPP needs to cooperate with its own MySQL server is in the location
/opt/lampp/var/mysql/mysql.sock and not in the location
/var/lib/mysql/mysql.sock where the original MySQL for CentOS keeps

So, you must edit the file /etc/my.cnf and add these lines to the bottom:

[client]
sock= /opt/lampp/var/mysql/mysql.sock



This is it!!

:-D
kotsoskorg
 
Posts: 9
Joined: 2010/02/15 14:59:03

XAMPP [error 2002] - Can't connect to local MySQL server thr

Postby pschaff » 2010/03/05 00:48:37

Welcome to the CentOS fora.

Now if you would just tell us where you got xampp - not a CentOS package, nor found in any of the usual Repositories. A google on
Code: Select all
xampp centos5 OR "centos 5" OR RHEL5 OR el5 OR "red hat enterprise linux 5"
seems to turn up a lot of advice on doing dubious Source Installs.
pschaff
Retired Moderator
 
Posts: 18276
Joined: 2006/12/13 20:15:34
Location: Tidewater, Virginia, North America

Re: XAMPP [error 2002] - Can't connect to local MySQL server through mysql.sock

Postby kotsoskorg » 2010/03/05 09:58:48

Indeed there are , but I tried the most , and the problem I experienced insisted.
Actually, there is something wrong on being together Xampp with its own packages
and original MySQL for CentOS 5.x. :-)
kotsoskorg
 
Posts: 9
Joined: 2010/02/15 14:59:03


Return to CentOS 5 - Server Support

Who is online

Users browsing this forum: No registered users and 0 guests