MySql problem ( Urgent Help)

shann

Well-Known Member
Jul 5, 2002
366
0
166
cPanel Access Level
Website Owner
Hi,

Suddenly mysql start to give some problem on the server and all the site giving this error mesage.

mySQL error: Can't connect to local MySQL server through socket '/var/tmp/mysql.sock' (2)
mySQL error code: 2002
Date: Friday 25th of July 2003 10:08:42 AM

Any help woudl be appreciate.

When we look at /var/tmp/ there is no mysql.sock file. Any help woudl be appreciate.

Thanks
MIke

cPanel.net Support Ticket Number:
 

casey

Well-Known Member
Jan 17, 2003
2,288
0
191
You should have a symlink to it from /var/lib/mysql/mysql.sock

cPanel.net Support Ticket Number:
 

moogle

Well-Known Member
Apr 7, 2003
94
0
156
What's the command to create the symlink?

cPanel.net Support Ticket Number:
 

euselect

Well-Known Member
Aug 3, 2003
51
0
156
the command is ln ( man ln )

example :

ln -s real_file new_sym_link

HTH

Neil

cPanel.net Support Ticket Number:
 

gundamz

Well-Known Member
Mar 27, 2002
245
0
316
Originally posted by casey
You should have a symlink to it from /var/lib/mysql/mysql.sock

cPanel.net Support Ticket Number:

why should yuo create a symlink to fix this problem?

cPanel.net Support Ticket Number:
 

ciphervendor

Well-Known Member
Aug 26, 2002
1,050
0
166
Originally posted by gundamz
why should yuo create a symlink to fix this problem?

cPanel.net Support Ticket Number:
Different applications look for the mysql.sock file in different locations.

cPanel.net Support Ticket Number:
 

Munch

Registered
Jun 20, 2003
3
0
151
I didnt work for me...Help!!!

I created the sym link in /var/lib/mysql/ to /var/tmp/mysql.sock and still recieved the same error.

Is t suppose to be the other way around? The /var/tmp/mysql.sock is a link. Is that linking to the /var/lib/mysql/mysql.sock and the mysql.sock just doesnt exist?

Please Help!!!

cPanel.net Support Ticket Number:
 

NNNils

Well-Known Member
Sep 17, 2002
580
0
166
search google for "mysql error code: 2002"

cPanel.net Support Ticket Number:
 

ciphervendor

Well-Known Member
Aug 26, 2002
1,050
0
166
Execute:

slocate mysql.sock

then reply back with the output.

cPanel.net Support Ticket Number:
 

Blackthorne

Member
Feb 1, 2003
17
0
151
I had the same problem with /var/lib/mysql.sock, the soft link didn't fix it.

I updated the permissions on /var/lib/mysql to 755 and mysql works now. :D

cPanel.net Support Ticket Number: