Yosemite - MAMP - Can't connect to local MySQL server through socket '/Applications/MAMP/tmp/mysql/mysql.sock' (2)
I had the same problem after upgrading MySQL on MAMP from 5.5 to 5.6 version. After long research I founded this decision https://drupal.stackexchange.com/questions/32402/drush-and-mysql-database-with-mamp-connection-problem
In my case there was no socket file at that location /Applications/MAMP/tmp/mysql/mysql.sock
.
The easy solution is to create a symlink:
cd /tmp
ln -s /Applications/MAMP/tmp/mysql/mysql.sock ./mysql.sock
The effect of which is to route all calls for /tmp/mysql.sock to the appropriate MAMP specific path.
simply remove two files ib_logfile0 and ib_logfile1 from /Applications/MAMP/db/mysql56
I had the same problem. I solved it following these steps:
- I stopped and restarted MySQL via System Preferences -> MySQL (see also https://stackoverflow.com/a/26523977/204807)
- I entered
sudo mysql_upgrade
in a terminal window, and pressed enter
After the update process I was able to connect with my MySQL.