Monday, July 31, 2006

MySQL - Socket error

On my Linux box, MySQL had been working fine.

Then, just a few days ago out of the blue for no apparent reason I started getting the following error.

Can't connect to local MySQL server through socket '/tmp/mysql.sock'

Now, we can't really say it is for no reason, obviously something in my system had changed. I am always messing around with that OS, without really understanding it.

Anyway, I found some great info here.

I will have to go through all the info there and understand and implement it, but for now I only did the following three lines worth.

chown -R root /usr/local/mysql
chown -R mysql /usr/local/mysql/var
chgrp -R mysql /usr/local/mysql

And it worked! Problem solved for now.

No comments: