Friday, November 16, 2012

mysql.sock SYMLink and sudo on MacOSX


Today I was trying to configure MySQL driver with Python on my Mac Machine. Everything went smooth but on connecting MySQL I was getting socket error as driver was pointing out to /tmp/mysql.sock

I made symlink of .pid file and it worked but when I used similar ln-s command for making symlink. It did not give any error. On doing ls-la it showed as well but on doing again it got removed. It was weird. On further investigation I learnt that .sock symlinks can't work without root access.

Moral of the story. Use Sudo where ever you can! :)