[MDEV-21465] Add --bind-address parameter for outgoing client connections Created: 2020-01-13 Updated: 2024-01-16 |
|
| Status: | Stalled |
| Project: | MariaDB Server |
| Component/s: | Scripts & Clients |
| Fix Version/s: | 11.5 |
| Type: | New Feature | Priority: | Critical |
| Reporter: | Hartmut Holzgraefe | Assignee: | Daniel Black |
| Resolution: | Unresolved | Votes: | 1 |
| Labels: | Compatibility, beginner-friendly, upstream-5.6 | ||
| Issue Links: |
|
||||||||
| Description |
|
Client library has the MYSQL_OPT_BIND option for this already, so the feature only needs to be exposed via command line option handling. MySQLs client binaries have this option since 5.6, and had it even earlier in the MySQL Cluster releases.
Background: when a client system has multiple interfaces / IP addresses, the OS kernel can pick whatever interface it prefers to connect to the server. Especially if multiple client IPs are in the same network, this usually means: pick the first one it has in the interface list. I originally implemented the patch for this back when still working for MySQL AB, as back then my Laptop would always choose to do replication with my desktop over slow/shared WLAN, even when having a cable plugged in that connected it to the desktop directly, as the WLAN device was somehow always initialized first ... |
| Comments |
| Comment by Iaroslav Babanin [ 2023-09-06 ] |
|
I would like to work on this. Thanks. |
| Comment by Daniel Black [ 2023-11-17 ] |
|
Thank you very much Iaroslav Babanin for contributing this feature (and especially accommodating my large expansion of scope to all client utils). |
| Comment by Daniel Black [ 2023-11-17 ] |
|
Please test https://github.com/MariaDB/server/commit/7639be7cca4d2e67b95694e1be5e841fa839e017 from PR 2750 |
| Comment by Ramesh Sivaraman [ 2024-01-16 ] |
|
ok to push |
| Comment by Daniel Black [ 2024-01-16 ] |
|
Thank you ramesh |