During mariabackup testing, I realized that for the option of "--password" I had to specify password in the commandline together.
If I use the option only without password, It says it requires a argument.
Geoff Montee (Inactive)
added a comment - As a workaround, you can add the user name and password to ~/.my.cnf. e.g.:
[mariabackup]
user=mariabackup
password=mypassword
See here:
https://mariadb.com/kb/en/library/mariabackup-overview/#authentication-and-privileges
I would like to also vote for this enhancement. We have strict requirements for not using passwords in command line and will not comply to DFSEC requirements without at least an environment variable to supply password vs. command line.
Geoff, the workaround is actually worse since it is in plain text in a config files, which is also a major violation. Even if the file has root+mysql read only permissions.
Richard Lane
added a comment - - edited I would like to also vote for this enhancement. We have strict requirements for not using passwords in command line and will not comply to DFSEC requirements without at least an environment variable to supply password vs. command line.
Geoff, the workaround is actually worse since it is in plain text in a config files, which is also a major violation. Even if the file has root+mysql read only permissions.
It changes the behavior in an incompatible way, existing scripts stop working (we had it in buildbot).
But the new behavior is compatible with other mariadb command-line tools, so let's still do it, but in 11.6+
Sergei Golubchik
added a comment - It changes the behavior in an incompatible way, existing scripts stop working (we had it in buildbot).
But the new behavior is compatible with other mariadb command-line tools, so let's still do it, but in 11.6+
Breakpoint 1, xb_get_one_option (opt=0x1761510 <xb_client_options+4704>, argument=0x0) at /home/dan/repos/mariadb-server-11.6/extra/mariabackup/xtrabackup.cc:2226
2226 switch(opt->id) {
(gdb) p *opt
$1 = {name = 0xeffdfe "password", id = 112, comment = 0xef7100 "This option specifies the password to use when connecting to the database. It accepts a string argument. See mysql --help for details.", value = 0x0,
Daniel Black
added a comment - Now that this was merged , was this break in behaviour intended?
+ docker exec mariadbcontainer18598 mariabackup --backup --target-dir=/backup/d --user root --password soverysecret
mariabackup: Deprecated program name. It will be removed in a future release, use '/usr/bin/mariadb-backup' instead
Enter password: [00] 2024-08-14 01:49:02 mariabackup: Error: unknown argument: 'soverysecret'
$ rr record -n extra/mariabackup/mariadb-backup -S /tmp/build-mariadb-server-11.6.sock --backup --target-dir=/tmp/d --user root --password soverysecret
rr: Saving execution to trace directory `/home/dan/.local/share/rr/mariadb-backup-0'.
Enter password:
[00] 2024-08-14 13:10:09 mariabackup: Error: unknown argument: 'soverysecret'
...
Breakpoint 1, xb_get_one_option (opt=0x1761510 <xb_client_options+4704>, argument=0x0) at /home/dan/repos/mariadb-server-11.6/extra/mariabackup/xtrabackup.cc:2226
2226 switch(opt->id) {
(gdb) p *opt
$1 = {name = 0xeffdfe "password", id = 112, comment = 0xef7100 "This option specifies the password to use when connecting to the database. It accepts a string argument. See mysql --help for details.", value = 0x0,
u_max_value = 0x0, typelib = 0x0, var_type = 9, arg_type = OPT_ARG, def_value = 0, min_value = 0, max_value = 0, deprecation_substitute = 0x0, block_size = 0, app_type = 0x0}
So argument is null for password.
So long args have to have --password=thesecret
fix: https://github.com/MariaDB/mariadb-docker/commit/1637a68a195a27f4a89fa8e6b9d0c13a1dcb015e
The mariadb-backup --password thissit syntax is no longer supported - use mariadb-backup --password=thissit
Daniel Black
added a comment - - edited For release notes:
The mariadb-backup --password thissit syntax is no longer supported - use mariadb-backup --password=thissit
People
Sergei Golubchik
Kwangbock Lee
Votes:
5Vote for this issue
Watchers:
13Start watching this issue
Dates
Created:
Updated:
Resolved:
Git Integration
Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.
{"report":{"fcp":1336.2999999523163,"ttfb":727.1999998092651,"pageVisibility":"visible","entityId":77306,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":0.5,"journeyId":"4639fb1f-d99c-442d-a0b8-91729643e5c5","navigationType":0,"readyForUser":1405.5999999046326,"redirectCount":0,"resourceLoadedEnd":1394.0999999046326,"resourceLoadedStart":735,"resourceTiming":[{"duration":5.799999952316284,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":735,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":735,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":740.7999999523163,"responseStart":0,"secureConnectionStart":0},{"duration":5.6000001430511475,"initiatorType":"link","name":"https://jira.mariadb.org/s/7ebd35e77e471bc30ff0eba799ebc151-CDN/lu2cib/820016/12ta74/494e4c556ecbb29f90a3d3b4f09cb99c/_/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&whisper-enabled=true","startTime":735.3999998569489,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":735.3999998569489,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":741,"responseStart":0,"secureConnectionStart":0},{"duration":98,"initiatorType":"script","name":"https://jira.mariadb.org/s/0917945aaa57108d00c5076fea35e069-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":735.5,"connectEnd":735.5,"connectStart":735.5,"domainLookupEnd":735.5,"domainLookupStart":735.5,"fetchStart":735.5,"redirectEnd":0,"redirectStart":0,"requestStart":735.5,"responseEnd":833.5,"responseStart":833.5,"secureConnectionStart":735.5},{"duration":158.70000004768372,"initiatorType":"script","name":"https://jira.mariadb.org/s/2d8175ec2fa4c816e8023260bd8c1786-CDN/lu2cib/820016/12ta74/494e4c556ecbb29f90a3d3b4f09cb99c/_/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&whisper-enabled=true","startTime":735.6999998092651,"connectEnd":735.6999998092651,"connectStart":735.6999998092651,"domainLookupEnd":735.6999998092651,"domainLookupStart":735.6999998092651,"fetchStart":735.6999998092651,"redirectEnd":0,"redirectStart":0,"requestStart":735.6999998092651,"responseEnd":894.3999998569489,"responseStart":894.3999998569489,"secureConnectionStart":735.6999998092651},{"duration":11.400000095367432,"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":735.8999998569489,"connectEnd":735.8999998569489,"connectStart":735.8999998569489,"domainLookupEnd":735.8999998569489,"domainLookupStart":735.8999998569489,"fetchStart":735.8999998569489,"redirectEnd":0,"redirectStart":0,"requestStart":735.8999998569489,"responseEnd":747.2999999523163,"responseStart":747.2999999523163,"secureConnectionStart":735.8999998569489},{"duration":99.20000004768372,"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":736.0999999046326,"connectEnd":736.0999999046326,"connectStart":736.0999999046326,"domainLookupEnd":736.0999999046326,"domainLookupStart":736.0999999046326,"fetchStart":736.0999999046326,"redirectEnd":0,"redirectStart":0,"requestStart":736.0999999046326,"responseEnd":835.2999999523163,"responseStart":835.2999999523163,"secureConnectionStart":736.0999999046326},{"duration":161.59999990463257,"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":736.2999999523163,"connectEnd":736.2999999523163,"connectStart":736.2999999523163,"domainLookupEnd":736.2999999523163,"domainLookupStart":736.2999999523163,"fetchStart":736.2999999523163,"redirectEnd":0,"redirectStart":0,"requestStart":736.2999999523163,"responseEnd":897.8999998569489,"responseStart":897.8999998569489,"secureConnectionStart":736.2999999523163},{"duration":243.09999990463257,"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":736.5,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":736.5,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":979.5999999046326,"responseStart":0,"secureConnectionStart":0},{"duration":161.90000009536743,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":736.5999999046326,"connectEnd":736.5999999046326,"connectStart":736.5999999046326,"domainLookupEnd":736.5999999046326,"domainLookupStart":736.5999999046326,"fetchStart":736.5999999046326,"redirectEnd":0,"redirectStart":0,"requestStart":736.5999999046326,"responseEnd":898.5,"responseStart":898.5,"secureConnectionStart":736.5999999046326},{"duration":243,"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":736.7999999523163,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":736.7999999523163,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":979.7999999523163,"responseStart":0,"secureConnectionStart":0},{"duration":162.19999980926514,"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":737,"connectEnd":737,"connectStart":737,"domainLookupEnd":737,"domainLookupStart":737,"fetchStart":737,"redirectEnd":0,"redirectStart":0,"requestStart":737,"responseEnd":899.1999998092651,"responseStart":899.1999998092651,"secureConnectionStart":737},{"duration":341,"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":740.5999999046326,"connectEnd":740.5999999046326,"connectStart":740.5999999046326,"domainLookupEnd":740.5999999046326,"domainLookupStart":740.5999999046326,"fetchStart":740.5999999046326,"redirectEnd":0,"redirectStart":0,"requestStart":740.5999999046326,"responseEnd":1081.5999999046326,"responseStart":1081.5999999046326,"secureConnectionStart":740.5999999046326},{"duration":610.2999999523163,"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":743.2999999523163,"connectEnd":743.2999999523163,"connectStart":743.2999999523163,"domainLookupEnd":743.2999999523163,"domainLookupStart":743.2999999523163,"fetchStart":743.2999999523163,"redirectEnd":0,"redirectStart":0,"requestStart":743.2999999523163,"responseEnd":1353.5999999046326,"responseStart":1353.5,"secureConnectionStart":743.2999999523163},{"duration":93.29999995231628,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":990.3999998569489,"connectEnd":990.3999998569489,"connectStart":990.3999998569489,"domainLookupEnd":990.3999998569489,"domainLookupStart":990.3999998569489,"fetchStart":990.3999998569489,"redirectEnd":0,"redirectStart":0,"requestStart":990.3999998569489,"responseEnd":1083.6999998092651,"responseStart":1083.6999998092651,"secureConnectionStart":990.3999998569489},{"duration":138.5,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2cib/820016/12ta74/e65b778d185daf5aee24936755b43da6/_/download/contextbatch/js/browser-metrics-plugin.contrib,-_super,-project.issue.navigator,-jira.view.issue,-atl.general/batch.js?agile_global_admin_condition=true&jag=true&jira.create.linked.issue=true&slack-enabled=true&whisper-enabled=true","startTime":1255.5999999046326,"connectEnd":1255.5999999046326,"connectStart":1255.5999999046326,"domainLookupEnd":1255.5999999046326,"domainLookupStart":1255.5999999046326,"fetchStart":1255.5999999046326,"redirectEnd":0,"redirectStart":0,"requestStart":1255.5999999046326,"responseEnd":1394.0999999046326,"responseStart":1394.0999999046326,"secureConnectionStart":1255.5999999046326},{"duration":108,"initiatorType":"script","name":"https://www.google-analytics.com/analytics.js","startTime":1330.1999998092651,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":1330.1999998092651,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1438.1999998092651,"responseStart":0,"secureConnectionStart":0}],"fetchStart":0,"domainLookupStart":0,"domainLookupEnd":0,"connectStart":0,"connectEnd":0,"requestStart":64,"responseStart":728,"responseEnd":743,"domLoading":732,"domInteractive":1462,"domContentLoadedEventStart":1462,"domContentLoadedEventEnd":1509,"domComplete":1676,"loadEventStart":1676,"loadEventEnd":1676,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":1443.7999999523163},{"name":"bigPipe.sidebar-id.end","time":1444.5999999046326},{"name":"bigPipe.activity-panel-pipe-id.start","time":1444.6999998092651},{"name":"bigPipe.activity-panel-pipe-id.end","time":1446.8999998569489},{"name":"activityTabFullyLoaded","time":1559.6999998092651}],"measures":[],"correlationId":"5bab251cd6d283","effectiveType":"4g","downlink":10,"rtt":0,"serverDuration":589,"dbReadsTimeInMs":10,"dbConnsTimeInMs":18,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}
As a workaround, you can add the user name and password to ~/.my.cnf. e.g.:
[mariabackup]
user=mariabackup
password=mypassword
See here:
https://mariadb.com/kb/en/library/mariabackup-overview/#authentication-and-privileges