I could figure this out eventually, but if someone has done this before
maybe they could save me the trouble.

Here's my situation:  I'm running mysql instances on two separate
machines and I'm looking to merge them into a single machine.  They are
accessed by our application as db-prod:3306 and db-prod-private:3306 for
our production instance and db-dev:3306 and db-dev-private:3306 for our
development instance.

The db-* interfaces are on the public network (but firewalled to our
organization) and db-*-private are on a private network within our
machine room.  They all have separate IPs:  x.x.x.51 and 10.x.x.51 for
prod; x.x.x.53 and 10.x.x.53 for dev.

So here's what I've done (and what I think I can do):

I've set up the dev instance running on the new machine and bound it to
127.0.0.1:3307 and the prod instance is bound to 127.0.0.1:3308.

Mysql doesn't let you bind to more than one address so I figure I can do
this with some iptables trickery.

it seems like the rules should be something like this:

-p tcp -d x.x.x.51  --dport 3306  --to-destination localhost:3308
-p tcp -d 10.x.x.51 --dport 3306  --to-destination localhost:3308
-p tcp -d x.x.x.53  --dport 3306  --to-destination localhost:3307
-p tcp -d 10.x.x.53 --dport 3306  --to-destination localhost:3307

but in terms of what chains/tables/etc that I need to put them in, I'm
stumped...

Anyone done this?
Brian

PS: How freaking hard is it to make mysql specifically bind to more than
one address? I mean really, looking on the web shows that its something
that people want to do...


_______________________________________________
rhelv5-list mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/rhelv5-list

Reply via email to