Activities

July 2013
M T W T F S S
« Jun   Aug »
1234567
891011121314
15161718192021
22232425262728
293031  

MySQL : [ERROR] Can’t start server : Bind on unix socket: Permission denied

Yesterday I got the following mysql error message when I’m restarting MySQL server after refresh the mysql data folder. I need to update some entries on my.cnf which requires a restart to take effect. Unfortunately restart did not success and I’m getting “[ERROR] Can’t start server : Bind on unix socket: Permission denied” error listed on error log.

Problem : Mysql group has not permitted to create files inside the data directory.

130730  5:28:51  InnoDB: Initializing buffer pool, size = 400.0M
130730  5:28:51  InnoDB: Completed initialization of buffer pool
130730  5:28:51  InnoDB: Started; log sequence number 0 44233
130730  5:28:51 [ERROR] Can't start server : Bind on unix socket: Permission denied
130730  5:28:51 [ERROR] Do you already have another mysqld server running on socket: /home/mysqldata/mysql/mysql.sock ?
130730  5:28:51 [ERROR] Aborting
130730  5:28:51  InnoDB: Starting shutdown...
130730  5:28:57  InnoDB: Shutdown completed; log sequence number 0 44233
130730  5:28:57 [Note] /usr/libexec/mysqld: Shutdown complete.

Solution
Give group to write permission on datadir folder and restart the mysql service

[root@090 ~]# chown -R mysql.mysql /home/mysqldata/mysql
[root@090 ~]# chmod -R 775 /home/mysqldata/mysql
[root@090 ~]# service mysqld start
Starting mysqld:                                           [  OK  ]
[root@rc-090 ~]#

Leave a Reply

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>