UnderHost Networks Ltd


If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.



Reply
  #1 (permalink)  
Old 08-22-2009, 08:48 AM
UnderHost's Avatar
UnderHost Management
 
Join Date: Jul 2008
Posts: 588
Default Can’t start server : Bind on unix socket: Permission denied

Today we had some problems with one of our Mysql database server. While doing mysql restart we could see the following errors in the .err log file located under /var/lib/mysql folder.

090817 1:58:19 [ERROR] Can’t start server : Bind on unix socket: Permission denied
090817 1:58:19 [ERROR] Do you already have another mysqld server running on socket: /var/lib/mysql/mysql.sock ?
090817 1:58:19 [ERROR] Aborting

Doing a local mysql connect on the server also reports the following error.

Can’t connect to local MySQL server through socket ‘/var/lib/mysql/mysql.sock’ (2)

The error is quite simple the only issue is with the socket as mysql daemon is not able to create the socket file under the mysql directory because of some permission issues.

Solution.

Step.1) First make sure you delete the existing socket file using the rm command.
Code:
— rm /var/lib/mysql/mysql.sock
Step.2 ) Killall existing mysql processes via the following command.
Code:
— killall -e -9 mysql
Step.3) Very important , Make sure the permission for the mysql database directory under /var/lib/ folder should mysql:root
Code:
— chown mysql:root mysql
Step.4) With the above information you should be able to start mysql sucessfully and the socket file should be created successfully under the database directory.
Code:
— service mysql start
You need to verify your database path , some servers are having different database path for ex. /var/run/mysql folders.

I am sure with the above tips mysql server should not have any problems and it should be running good.
__________________

UnderHostProviding Affordable and Quality Web Hosting & Offshore Hosting
24/7 Fast Support / 99.9% Uptime Guarantee
UHVPSVirtual Private Servers & Premium Offshore VPS
Hong Kong - Singapore - USA - Canada - Netherlands - United Kingdom - Germany
Reply With Quote
underhost.us
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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Loading...


All times are GMT -4. The time now is 04:41 PM.
Copyright © 2009 UnderHost Networks Ltd