Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid

MySQL multihomed source IP

by AtmanActive (Novice)
on Nov 07, 2012 at 18:38 UTC ( #1002716=perlquestion: print w/replies, xml ) Need Help??
AtmanActive has asked for the wisdom of the Perl Monks concerning the following question:

Hello all!

I'm wondering, is there a way to specify source IP address when connecting to remote MySQL via TCP (DBI/DBD) on multihomed machines.

Like 'bind to' option, or parameter or variable or something.



Replies are listed 'Best First'.
Re: MySQL multihomed source IP
by Anonymous Monk on Nov 07, 2012 at 22:09 UTC

      Actually that won't work.

      If you're using DBD::mysqlPP you need to patch it to take LocalAddr and pass it along to Net::MySQL so it can pass it along to IO::Socket::INET

      bind-address= is supposed to work for libmysqlclient (ie DBD::mysql) but not all versions support this

      No, no, and no, host parameter is destination IP, ie to which IP to connect to, but I'm looking for source IP, ie from which IP to connect.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://1002716]
Approved by Corion
Front-paged by Tanktalus
[Discipulus]: it has some, even dangerous, implication
[Discipulus]: I still use but I also attract many critics for this: I use when I call subs defined in the very same file, just to recognize them. You can avoid (but sometimes is needed)
[marto]: believe it or not this is a SPAM account :P
[Discipulus]: it seems a legitimate one.. grin ..

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (8)
As of 2018-05-22 12:16 GMT
Find Nodes?
    Voting Booth?