[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:
Relates
relates to MDEV-19248 Implement MASTER_BIND for CHANGE MASTER Open

 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.

mysql-5.6.40 > bin/mysql --help | grep bind
  --bind-address=name IP address to bind to.
bind-address                      (No default value)

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

Generated at Thu Feb 08 09:07:21 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.