Tell me more ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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.

share|improve this question
You'll like my related question: serverfault.com/questions/93740/… – kolypto Dec 15 '09 at 0:44

migrated from stackoverflow.com Dec 14 '09 at 7:03

1 Answer

up vote 4 down vote accepted

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.

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.