Go Back   Cloud Computing > Support > Tutorials and Documentation
 

Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old 10-31-11, 03:45
BOD Member
 
Join Date: Apr 2011
Posts: 199
Default /var/lib/mysql/mysql.sock' (111) error.

I am facing problem with /var/lib/mysql/mysql.sock' (111) error.
How can I fix it?
Reply With Quote
  #2 (permalink)  
Old 10-31-11, 05:11
BOD Member
 
Join Date: Dec 2010
Posts: 227
Default

You can run the following command :
Quote:
service mysql stop
rm -f /var/lib/mysql/mysql.sock
service mysql start
ln -s /tmp/mysql.sock /var/lib/mysql/mysql.sock
Reply With Quote
  #3 (permalink)  
Old 10-31-11, 05:35
Moderator
 
Join Date: Nov 2010
Posts: 476
Default

I agree with you. But if any case it fails then you have to run the following :

The following needed to be in the /etc/my.cnf file:

[mysqld]
set-variable = max_connections=500

[client]
port = 3306
socket = /tmp/mysql.sock
[mysqld]
port = 3306
socket = /tmp/mysql.sock

There are only 2 lines, so you can add the [client] and [mysqld] parts.
You have to run the following commands to shut down the mysql and chkservd.


Service mysql stop :
/etc/rc.d/init.d/chkservd stop

Then you have to removed the following files:
rm -rf /tmp/mysql.sock
rm -rf /var/lib/mysql/mysql.sock

Now restart mysql and chkservd with the following commands and mysql will create the mysql.sock file in the /tmp directory as outlined in the updated my.cnf file:

service mysql start :
/etc/rc.d/init.d/chkservd start

Now create the softlink with this:
ln -s /tmp/mysql.sock /var/lib/mysql/mysql.sock
Reply With Quote
  #4 (permalink)  
Old 10-31-11, 06:06
BOD Member
 
Join Date: Apr 2011
Posts: 199
Default

I want to know that which should be the proper symlink among the two below utilized widely.

A. /tmp/mysql.sock

B. /var/tmp/mysql.sock
Reply With Quote
  #5 (permalink)  
Old 10-31-11, 06:18
Moderator
 
Join Date: Nov 2010
Posts: 476
Default

For the valid link utilized on the server among the above two, check the /etc/my.cnf file for following line.

Quote:
" socket=/var/tmp/mysql.sock "
You have to build the symlink for the socket remark in above line.
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off
Forum Jump


All times are GMT -6. The time now is 00:15.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
Copyright © 1999-2012, BODHost Ltd. All rights reserved.