Yesterday I was using Migration Assistant to move my data from my old Macbook Air to my new Macbook Pro. I assumed Migration Assistant can do a perfect job. However when I ran my rails server, it showed “Mysql2::Error: Can't connect to local MySQL server through socket ‘/tmp/mysql.sock' (2)”.
So I googled for a few answers, finally fixed it by using tips from this one. Basically it looks like after the profile migration on my Mac, I lost some folder permissions using by Homebrew:
Simply, the solution is to type this command in your terminal:
sudo chown -R “$USER”:admin /usr/local
then I ran a update on my brew:
Everything is back to normal 🙂