Friday, January 6, 2017

Can't start server : Bind on unix socket: Permission denied

I had a test instance of MySQL running on a VM and for whatever reason things got messed up and I couldn't access it anymore

Looking in the error log I saw this:

2017-01-06 10:58:44 5227 [ERROR] Can't start server : Bind on unix socket: Permission denied
2017-01-06 10:58:44 5227 [ERROR] Do you already have another mysqld server running on socket: /var/lib/mysql/mysql.sock ?
2017-01-06 10:58:44 5227 [ERROR] Aborting

I didn't understand what was going on but Google yielded a solution that worked here:

http://serverfault.com/questions/497194/mysql-bind-on-unix-socket-permission-denied

Very important: Make sure the permission for the MySQL database directory under /var/lib/folder should be mysql:root
chown -R mysql:root /var/lib/mysql

No comments:

Post a Comment