By default, MySQL is limited to connecting only to localhost (127.0.0.1) due to some security reason. if you want remote access to MySQL, you need to change the default my.cnf value.
open the my.cnf file located in
Applications / MAMP / TMP / MySQL / my.cnf
and edit the following
bind-address = 127.0.0.1
to
bind-address = 0.0.0.0
save the file and restart the mysql server by entering the following command in your terminal
sudo / etc / init.d / mysql restart
your MySQL server should now have network access. to verify that it is listening on the entire type of interface in the terminal
netstat -anp | grep 3306
and if you answer that it works,
tcp 0 0 0.0.0.0:3306 0.0.0.0:* LISTEN -
the above information is taken from this link: http://rclermont.blogspot.in/2008/05/configuring-mysql-for-network-access.html
hope this helps
source share