How do connect to MySQL via IP, not just localhost

MySQLwamp

I would like to make my home WAMP server's MySQL instance be exposed to the internet for updates from an external source. I am able to use MySQL Workbench and connect locally (on same box) with localhost or 127.0.0.1. If I use the boxes IP, I can't connect. I'm sure this is a simple security configuration change, just now sure where.

My desire is to port forward 3306 on my router to this box.

What settings need changing?

Best Answer

Whenever you are using the computer's IP address, it is no longer considered part of the loopback (localhost or 127.0.0.1). Instead it is routed and acts as an external local connection. You will need to edit your mysql.ini (or whatever configuration file) and comment out the BIND 127.0.0.1 or BIND localhost line. Restart your MySQL server and it should allow incoming requests from external sources (including the same computer through the nonroutable IP address).

Related Question