Redirecting MySQL

To redirect traffic from one db to another (as a temporary measure if you have multiple places in your app to change the login data) you might try this:

iptables -t nat -A PREROUTING -p tcp –dport 3306 -j DNAT –to :3306

I ran across this when a customer wanted to redirect traffic from the mysql instance on his server to the CloudDB that he was creating. He wanted to make sure that if he missed an update in the app, he stil got data. I definitely put the YMMV with this one!

About vicki

Welcome to the Sovereign Republic of Vickistan. I am the President here. Lucky me! No taxes or laws yet. Lucky you!
This entry was posted in Linux. Bookmark the permalink.