mysql as well as mysqldump (and presumedly all the other tools) silently ignore the --port option if no host is given or it is localhost.
This happens because localhost is treaded specially, and instead a socket connection is made. So the problem here, is that giving --port does not force --protocol=tcp, which would fix this problem.
There are several things that are wrong with this:
a) it is not described with the --port option in the man pages of the respective tools
b) a user input is silently discarded, not even a warning is printed
c) This is really surprising.
d) It is documented somewhere, but not in the obvious places
e) There is already a bug report on this in oracles bug tracker since ages https://bugs.mysql.com/bug.php?id=55796
Well, I'm running out of steam coming up with more letter reasons. But this behavior is really annoying. When would I as the user want to have an explicit `--port` argument be ignored if I give it? I mean, if mysql where able to deduce somehow that the port is going to the same mysql instance as the socket it can find - fine - but I would be very surprised if it could without connecting to both.
- relates to
-
MDEV-28850
mysql client program conflicting protocol options deserve warnings
-
-
Open
{"report":{"fcp":4616.699999988079,"ttfb":357.69999998807907,"pageVisibility":"visible","entityId":65308,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":0,"journeyId":"28aeb51a-89a3-49be-8361-4cb22182caaa","navigationType":0,"readyForUser":4533.699999988079,"redirectCount":0,"resourceLoadedEnd":5412.5999999940395,"resourceLoadedStart":373.5,"resourceTiming":[{"duration":213.59999999403954,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":373.5,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":373.5,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":587.0999999940395,"responseStart":0,"secureConnectionStart":0},{"duration":213.59999999403954,"initiatorType":"link","name":"https://jira.mariadb.org/s/7ebd35e77e471bc30ff0eba799ebc151-CDN/lu2cib/820016/12ta74/2bf333562ca6724060a9d5f1535471f6/_/download/contextbatch/css/jira.browse.project,project.issue.navigator,jira.view.issue,jira.general,jira.global,atl.general,-_super/batch.css?agile_global_admin_condition=true&jag=true&jira.create.linked.issue=true&slack-enabled=true","startTime":373.7999999821186,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":373.7999999821186,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":587.3999999761581,"responseStart":0,"secureConnectionStart":0},{"duration":3244.5,"initiatorType":"script","name":"https://jira.mariadb.org/s/0917945aaa57108d00c5076fea35e069-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":374,"connectEnd":374,"connectStart":374,"domainLookupEnd":374,"domainLookupStart":374,"fetchStart":374,"redirectEnd":0,"redirectStart":0,"requestStart":990,"responseEnd":3618.5,"responseStart":3086.2999999821186,"secureConnectionStart":374},{"duration":3259,"initiatorType":"script","name":"https://jira.mariadb.org/s/2d8175ec2fa4c816e8023260bd8c1786-CDN/lu2cib/820016/12ta74/2bf333562ca6724060a9d5f1535471f6/_/download/contextbatch/js/jira.browse.project,project.issue.navigator,jira.view.issue,jira.general,jira.global,atl.general,-_super/batch.js?agile_global_admin_condition=true&jag=true&jira.create.linked.issue=true&locale=en&slack-enabled=true","startTime":374.19999998807907,"connectEnd":374.19999998807907,"connectStart":374.19999998807907,"domainLookupEnd":374.19999998807907,"domainLookupStart":374.19999998807907,"fetchStart":374.19999998807907,"redirectEnd":0,"redirectStart":0,"requestStart":991,"responseEnd":3633.199999988079,"responseStart":3245.0999999940395,"secureConnectionStart":374.19999998807907},{"duration":2352.2000000178814,"initiatorType":"script","name":"https://jira.mariadb.org/s/a9324d6758d385eb45c462685ad88f1d-CDN/lu2cib/820016/12ta74/c92c0caa9a024ae85b0ebdbed7fb4bd7/_/download/contextbatch/js/atl.global,-_super/batch.js?locale=en","startTime":374.39999997615814,"connectEnd":374.39999997615814,"connectStart":374.39999997615814,"domainLookupEnd":374.39999997615814,"domainLookupStart":374.39999997615814,"fetchStart":374.39999997615814,"redirectEnd":0,"redirectStart":0,"requestStart":991.8999999761581,"responseEnd":2726.5999999940395,"responseStart":2725.7999999821186,"secureConnectionStart":374.39999997615814},{"duration":904,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2cib/820016/12ta74/1.0/_/download/batch/jira.webresources:calendar-en/jira.webresources:calendar-en.js","startTime":374.5,"connectEnd":374.5,"connectStart":374.5,"domainLookupEnd":374.5,"domainLookupStart":374.5,"fetchStart":374.5,"redirectEnd":0,"redirectStart":0,"requestStart":1099.5999999940395,"responseEnd":1278.5,"responseStart":1223.7999999821186,"secureConnectionStart":374.5},{"duration":3221.4000000059605,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2cib/820016/12ta74/1.0/_/download/batch/jira.webresources:calendar-localisation-moment/jira.webresources:calendar-localisation-moment.js","startTime":374.69999998807907,"connectEnd":374.69999998807907,"connectStart":374.69999998807907,"domainLookupEnd":374.69999998807907,"domainLookupStart":374.69999998807907,"fetchStart":374.69999998807907,"redirectEnd":0,"redirectStart":0,"requestStart":1095.2999999821186,"responseEnd":3596.0999999940395,"responseStart":3392,"secureConnectionStart":374.69999998807907},{"duration":225.30000001192093,"initiatorType":"link","name":"https://jira.mariadb.org/s/b04b06a02d1959df322d9cded3aeecc1-CDN/lu2cib/820016/12ta74/a2ff6aa845ffc9a1d22fe23d9ee791fc/_/download/contextbatch/css/jira.global.look-and-feel,-_super/batch.css","startTime":374.89999997615814,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":374.89999997615814,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":600.1999999880791,"responseStart":0,"secureConnectionStart":0},{"duration":903.5,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":375.09999999403954,"connectEnd":375.09999999403954,"connectStart":375.09999999403954,"domainLookupEnd":375.09999999403954,"domainLookupStart":375.09999999403954,"fetchStart":375.09999999403954,"redirectEnd":0,"redirectStart":0,"requestStart":1099,"responseEnd":1278.5999999940395,"responseStart":1224.2999999821186,"secureConnectionStart":375.09999999403954},{"duration":225.09999999403954,"initiatorType":"link","name":"https://jira.mariadb.org/s/3ac36323ba5e4eb0af2aa7ac7211b4bb-CDN/lu2cib/820016/12ta74/d176f0986478cc64f24226b3d20c140d/_/download/contextbatch/css/com.atlassian.jira.projects.sidebar.init,-_super,-project.issue.navigator,-jira.view.issue/batch.css?jira.create.linked.issue=true","startTime":375.2999999821186,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":375.2999999821186,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":600.3999999761581,"responseStart":0,"secureConnectionStart":0},{"duration":2354.5999999940395,"initiatorType":"script","name":"https://jira.mariadb.org/s/5d5e8fe91fbc506585e83ea3b62ccc4b-CDN/lu2cib/820016/12ta74/d176f0986478cc64f24226b3d20c140d/_/download/contextbatch/js/com.atlassian.jira.projects.sidebar.init,-_super,-project.issue.navigator,-jira.view.issue/batch.js?jira.create.linked.issue=true&locale=en","startTime":375.5,"connectEnd":375.5,"connectStart":375.5,"domainLookupEnd":375.5,"domainLookupStart":375.5,"fetchStart":375.5,"redirectEnd":0,"redirectStart":0,"requestStart":1101.3999999761581,"responseEnd":2730.0999999940395,"responseStart":1225.199999988079,"secureConnectionStart":375.5},{"duration":5036.200000017881,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2cib/820016/12ta74/1.0/_/download/batch/jira.webresources:bigpipe-js/jira.webresources:bigpipe-js.js","startTime":376.39999997615814,"connectEnd":376.39999997615814,"connectStart":376.39999997615814,"domainLookupEnd":376.39999997615814,"domainLookupStart":376.39999997615814,"fetchStart":376.39999997615814,"redirectEnd":0,"redirectStart":0,"requestStart":1278.0999999940395,"responseEnd":5412.5999999940395,"responseStart":5410.899999976158,"secureConnectionStart":376.39999997615814},{"duration":5034,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2cib/820016/12ta74/1.0/_/download/batch/jira.webresources:bigpipe-init/jira.webresources:bigpipe-init.js","startTime":378.39999997615814,"connectEnd":378.39999997615814,"connectStart":378.39999997615814,"domainLookupEnd":378.39999997615814,"domainLookupStart":378.39999997615814,"fetchStart":378.39999997615814,"redirectEnd":0,"redirectStart":0,"requestStart":1278.2999999821186,"responseEnd":5412.399999976158,"responseStart":5410,"secureConnectionStart":378.39999997615814},{"duration":341.7999999821186,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":4174.5999999940395,"connectEnd":4174.5999999940395,"connectStart":4174.5999999940395,"domainLookupEnd":4174.5999999940395,"domainLookupStart":4174.5999999940395,"fetchStart":4174.5999999940395,"redirectEnd":0,"redirectStart":0,"requestStart":4470.399999976158,"responseEnd":4516.399999976158,"responseStart":4514.799999982119,"secureConnectionStart":4174.5999999940395},{"duration":404.5,"initiatorType":"script","name":"https://www.google-analytics.com/analytics.js","startTime":4446,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":4446,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":4850.5,"responseStart":0,"secureConnectionStart":0},{"duration":643.6000000238419,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":4844.899999976158,"connectEnd":4844.899999976158,"connectStart":4844.899999976158,"domainLookupEnd":4844.899999976158,"domainLookupStart":4844.899999976158,"fetchStart":4844.899999976158,"redirectEnd":0,"redirectStart":0,"requestStart":5412.199999988079,"responseEnd":5488.5,"responseStart":5487,"secureConnectionStart":4844.899999976158}],"fetchStart":0,"domainLookupStart":88,"domainLookupEnd":142,"connectStart":142,"connectEnd":167,"secureConnectionStart":150,"requestStart":168,"responseStart":358,"responseEnd":373,"domLoading":365,"domInteractive":5534,"domContentLoadedEventStart":5534,"domContentLoadedEventEnd":5588,"domComplete":6446,"loadEventStart":6446,"loadEventEnd":6447,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":5499.299999982119},{"name":"bigPipe.sidebar-id.end","time":5500.0999999940395},{"name":"bigPipe.activity-panel-pipe-id.start","time":5500.199999988079},{"name":"bigPipe.activity-panel-pipe-id.end","time":5502.299999982119},{"name":"activityTabFullyLoaded","time":5606.5999999940395}],"measures":[],"correlationId":"1aba35f1611e7e","effectiveType":"4g","downlink":10,"rtt":0,"serverDuration":110,"dbReadsTimeInMs":11,"dbConnsTimeInMs":19,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}
serg: to the No, I am really puzzled.
I have thought an option in a configuration file is different from the same option on the command line only for the timing of their parsing.
E.g --port can be specified in 3 locations (and each have a number of option repeats) as in
mysql --defaults-file=file_def --defaults-extra-file=file_extra --port=effective_value
and the effective_value would prevail.
If it's correct so far, what makes the command line version of the option so special?