0

When running a command like:

mysql -u mysql -h sql.remoteaddress.com

mysql is connecting using the eth0 interface. How do I ask it to use the eth1 interface which has a different IP address than eth0.

Thanks.

  • You'll like my related question: http://serverfault.com/questions/93740/restrict-an-arbitrary-application-to-a-specific-ip-address-in-linux – kolypto Dec 15 '09 at 00:44

1 Answers1

5

Set a routing rule so that connections going to the network where sql.remoteaddress.com resides goes through eth1 rather than the default at eth0.

Try "route --help" to see the description of how to add a route. You'll likely need root/admin access to set up the routing rule.

NathanL
  • 219
  • 1
  • 2