Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I have an Ubuntu server and I've installed MySQL. How would I use my two physical static IP addresses in my.cnf bind-address -- can I add two IP addresses?

share|improve this question

2 Answers 2

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.

share|improve this answer

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:

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

Just look at the second part with the answer.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.