You are here

How I accessed MAMP MySQL from my other localhost

I just figured out how to access the MySQL that runs when I run MAMP from my other localhost (the one that came with my mac). I'm referring to http://localhost/~myusername. The error 2002 said it couldn't find MySQL at /var/mysql so I created a symbolic link there and pointed it to the MySQL that I have installed as a result of installing MAMP. Of course I have to run MySQL there by starting MAMP. Here is what I did.
sudo mkdir /var/mysql
sudo ln -s /Applications/MAMP/tmp/mysql/mysql.sock /var/mysql/mysql.sock