How to Bind to Static IP address in MySQL

Only one address can be specified, but you can set bind-address to 0.0.0.0 in order to make MySQL listen on all available interfaces.


As Adam said, use bind-address = 0.0.0.0 to get MySQL to listen to all IP addresses. This will ensure that it listens to bnoth static IP's you've got on the box.

If you have more than 2 static IP's and don't want MySQL listening on those ports, install a Firewall on your box and block off port 3306 to all but the two IP's you want using MySQL. That way your firewall handles the access control rather than MySQL.

Here is a "little" guide to set up the firewall:

https://stackoverflow.com/questions/10055164/connection-to-mysql-server-in-syn-sent

Just look at the second part with the answer.