Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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
    address 10.153.24.230
    netmask 255.255.255.240
    network 10.153.24.224
    broadcast 10.153.24.239
    dns-nameservers 8.8.8.8


auto eth1
iface eth1 inet static
    address 10.153.24.195
    netmask 255.255.255.224
    gateway 10.153.24.193
    broadcast 10.153.23.223
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
add comment

1 Answer

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

share|improve this answer
add comment

Your Answer

 
discard

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