WL#3126: TCP address binding for mysql client library
Affects: Server-6.0 — Status: Complete — Priority: Medium
On clients with multiple possible TCP routes to a server it would be nice to be able to specify which of the clients cofigured IP address to connect to the server from. E.g. with my laptop that has both a wireless and a twisted pair network interface both connectiong to the same network segment on the same router i'd like to be able to configure which interface to use (preferably the wired one as it is faster, but sometimes the wireless one as i might want to wander around), right now it just depends on which interface became the default route for the network which itself depends on the order in which the DHCP leases for the interfaces were received on startup. This also affects authentication against the MySQL server as we authenticate client hosts by their connection IP address, so right now i need to add user entries for both possible client addresses or have to use wildcards in the host address part.
* add a new option MYSQL_OPT_BIND to mysql_options() that takes a DNS name or IP address in string form as a char* argument * extend CLI_MYSQL_REAL_CONNECT() in sql-common/client.c to bind to the specified address on connect using the bind(2) system call after resolving the specified address * add --bind-address command line options to all bundled binaries using the client API
see attached patch against yesterdays (Jan 29th) 5.2bk source
Copyright (c) 2000, 2015, Oracle Corporation and/or its affiliates. All rights reserved.