I recently launched a new website that makes use of a central forum on another server for member login details, comments etc.. After discussion with The Planet they thought a Virtual Private Rack would be the best solution to the matter of high bandwidth due to using remote mysql connections.
In my VPR I have two servers, server #1 has the forum on it and #2 has the site which remotely connects to the MySQL database on server #1. In the past I used the public IP of the server to remotely connect and it all worked fine. Server load was fine. The only problem was the high amount of bandwidth passing between the server, which was billable at The Planet. Hence the VPR.
In the new setup any bandwidth sent through the eth0 NIC is billable and any sent through eth1 is private and unmetered. I am an absolute rookie to setting up networks via SSH but have managed to get it so that server #1 eth1 is set to 10.0.0.1 and #2 is set to 10.0.0.2 with the following configs in /etc/sysconfig/network-scripts/ifcfg-eth1:
CODE
DEVICE=eth1
HWADDR=<removed>
IPADDR=10.0.0.2
NETMASK=255.255.255.0
ONBOOT=yes
HWADDR=<removed>
IPADDR=10.0.0.2
NETMASK=255.255.255.0
ONBOOT=yes
(That's the config for server #2, server #1 is the same except the IPADDR is 10.0.0.1).
With these configs I can ping 10.0.0.1 from server #2 and vice-versa. So I assume that means that the two servers can see each other on these private IPs.
I have setup my forum MySQL database on server #1 so that it allows remote connections from 10.0.0.2 and the public IP of the server.
The problem is that when I change the remote host for the MySQL connection from the public IP of server #1 to the private IP 10.0.0.1 it crashes MySQL on server #1. If I try to shut down the service in SSH it just hangs on "Shutting down MySQL" and continues printing the full-stops indefinately. The only way to get MySQL back up is to killall -9 mysqld and then restart the service.
If I then go back to using the public IP of the server to remotely connect to MySQL it works fine. No problems what-so-ever. I have setup a test page on server #2 that uses 10.0.0.1 in the mysql connect and that works fine too; it's only when I switch over the whole site to 10.0.0.1 that the problem occurs. The site on server #2 is very high traffic, but I don't understand why using the public IP would work fine and using the private IP would crash the mysql service.
Any help would be greatly appreciated.
Thank you.