Reputation: 15798
I recently upgraded to Mountain Lion OSX and my already working MySql has stopped working. When I try to run MySql in terminal all I get is the following error?
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
Has anyone else faced the same problem?
Upvotes: 3
Views: 2094
Reputation: 28094
I faced the same problem. The error is caused by MySQL not running. The Mac OS X installer removes the autostart item for MySQL. Here is what I've done:
sudo mv oldversion/data newversion/data
command.If you are using PHP and PHPMyAdmin, yopu'll have to install the mcrypt
extension. Here is a step-by-step guide for that: http://remonpel.nl/2012/01/adding-mcrypt-to-your-osx-based-php-server-setup/
Upvotes: 1