in MySQL

OS X – My SQL Socket Error.

I was getting some error while execute mysql.

It’s just socket error.

If you have /tmp/mysql.sock but no /var/mysql/mysql.sock then…

# cd /var 
# mkdir mysql
# cd mysql
# ln -s /tmp/mysql.sock mysql.sock

If you have /var/mysql/mysql.sock but no /tmp/mysql.sock then

# cd /tmp
# ln -s /var/mysql/mysql.sock mysql.sock

You will need permissions to create the directory and link, so just prefix the commands above with sudo if necessary.

you got this site :
http://stackoverflow.com/questions/4219970/warning-mysql-connect-2002-no-such-file-or-directory-trying-to-connect-vi

Write a Comment

Comment