Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-21465

Add --bind-address parameter for outgoing client connections

Details

    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 ...

      Attachments

        Issue Links

          Activity

            TheIaroslav Iaroslav Babanin added a comment - - edited

            I would like to work on this. Thanks.

            TheIaroslav Iaroslav Babanin added a comment - - edited I would like to work on this. Thanks.
            danblack Daniel Black added a comment -

            Thank you very much Iaroslav Babanin for contributing this feature (and especially accommodating my large expansion of scope to all client utils).

            danblack Daniel Black added a comment - Thank you very much Iaroslav Babanin for contributing this feature (and especially accommodating my large expansion of scope to all client utils).
            danblack Daniel Black added a comment - Please test https://github.com/MariaDB/server/commit/7639be7cca4d2e67b95694e1be5e841fa839e017 from PR 2750

            ok to push

            ramesh Ramesh Sivaraman added a comment - ok to push
            danblack Daniel Black added a comment -

            Thank you ramesh

            danblack Daniel Black added a comment - Thank you ramesh

            Status: waiting on the contributor

            serg Sergei Golubchik added a comment - Status: waiting on the contributor

            People

              danblack Daniel Black
              hholzgra Hartmut Holzgraefe
              Votes:
              1 Vote for this issue
              Watchers:
              10 Start watching this issue

              Dates

                Created:
                Updated:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.