Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have got two NICs configured on a VM - each is tied to a specific network, one is a DMZ, the other is an internal network.

I want MySQL to listen on the internal network only and Apache on the DMZ listening for HTTP and HTTPS. But as soon as I add the second interface I run into trouble. I can hit HTTP on either interface, but can not hit 3306 on the internal network for MySQL.

Here's the config... could someone sanity check this please?

auto lo
iface lo inet loopback

auto eth0
iface eth0 inet static

auto eth1
iface eth1 inet static
share|improve this question
can you ping and log in to from the the 'mysql' nic or is it just the mysql port that is closed? If you cannot ping it, I would think about routing problems (solvable adding static routes on the interface without default gateway). Otherwise it could be indeed that the mysql server only listens on the other interface and you should change my.cnf to change it. – natxo asenjo Sep 23 '10 at 18:04

Check bind-address in /etc/mysql/my.cnf - it should have the ip address of the internal card instead of the default

share|improve this answer

Your Answer


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