Starting from 10.4, mysql_secure_installation gets stuck at the very beginning of execution if the database doesn't have root@localhost and the script is executed under another superuser.
It happens because after successfully connecting under the other user, it immediately runs show create user root@localhost, gets an error, interprets it as a failure to connect, and goes into the loop asking again for a password:
mysql_secure_installation from 10.4 7f03a933, console output
|
Enter current password for root (enter for none):
|
ERROR 1133 (28000) at line 1: Can't find any matching row in the user table
|
Enter current password for root (enter for none):
|
ERROR 1133 (28000) at line 1: Can't find any matching row in the user table
|
Enter current password for root (enter for none):
|
ERROR 1133 (28000) at line 1: Can't find any matching row in the user table
|
10.4 7f03a933, general log
|
200506 21:58:39 16 Connect elenst@localhost as anonymous on
|
16 Query show create user root@localhost
|
16 Quit
|
200506 22:00:11 17 Connect elenst@localhost as anonymous on
|
17 Query show create user root@localhost
|
17 Quit
|
200506 22:00:13 18 Connect elenst@localhost as anonymous on
|
18 Query show create user root@localhost
|
Earlier it wouldn't matter much, because most of operations couldn't be performed anyway due to the non-existing owner of mysql.user. Now with the trend of allowing removal of root@localhost (MDEV-19650), it becomes an issue.
Please also note the cosmetic problems, hardcoded "root" in messages like
Enter current password for root
|
where it is really asking for a password of a user it is going to pass to MariaDB client.
{"report":{"fcp":1564,"ttfb":705.9000005722046,"pageVisibility":"visible","entityId":86564,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":0.5,"journeyId":"6e59aaee-bcd7-412e-87b3-c32aea113c0b","navigationType":0,"readyForUser":1650.3000001907349,"redirectCount":0,"resourceLoadedEnd":2331.9000005722046,"resourceLoadedStart":711.6999998092651,"resourceTiming":[{"duration":335,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":711.6999998092651,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":711.6999998092651,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1046.6999998092651,"responseStart":0,"secureConnectionStart":0},{"duration":334.9000005722046,"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":712,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":712,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1046.9000005722046,"responseStart":0,"secureConnectionStart":0},{"duration":389.69999980926514,"initiatorType":"script","name":"https://jira.mariadb.org/s/0917945aaa57108d00c5076fea35e069-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":712.1000003814697,"connectEnd":712.1000003814697,"connectStart":712.1000003814697,"domainLookupEnd":712.1000003814697,"domainLookupStart":712.1000003814697,"fetchStart":712.1000003814697,"redirectEnd":0,"redirectStart":0,"requestStart":712.1000003814697,"responseEnd":1101.8000001907349,"responseStart":1101.8000001907349,"secureConnectionStart":712.1000003814697},{"duration":440.1000003814697,"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":712.3000001907349,"connectEnd":712.3000001907349,"connectStart":712.3000001907349,"domainLookupEnd":712.3000001907349,"domainLookupStart":712.3000001907349,"fetchStart":712.3000001907349,"redirectEnd":0,"redirectStart":0,"requestStart":712.3000001907349,"responseEnd":1152.4000005722046,"responseStart":1152.4000005722046,"secureConnectionStart":712.3000001907349},{"duration":443.70000076293945,"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":712.6999998092651,"connectEnd":712.6999998092651,"connectStart":712.6999998092651,"domainLookupEnd":712.6999998092651,"domainLookupStart":712.6999998092651,"fetchStart":712.6999998092651,"redirectEnd":0,"redirectStart":0,"requestStart":712.6999998092651,"responseEnd":1156.4000005722046,"responseStart":1156.4000005722046,"secureConnectionStart":712.6999998092651},{"duration":443.8999996185303,"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":712.9000005722046,"connectEnd":712.9000005722046,"connectStart":712.9000005722046,"domainLookupEnd":712.9000005722046,"domainLookupStart":712.9000005722046,"fetchStart":712.9000005722046,"redirectEnd":0,"redirectStart":0,"requestStart":712.9000005722046,"responseEnd":1156.8000001907349,"responseStart":1156.8000001907349,"secureConnectionStart":712.9000005722046},{"duration":444.19999980926514,"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":713,"connectEnd":713,"connectStart":713,"domainLookupEnd":713,"domainLookupStart":713,"fetchStart":713,"redirectEnd":0,"redirectStart":0,"requestStart":713,"responseEnd":1157.1999998092651,"responseStart":1157.1999998092651,"secureConnectionStart":713},{"duration":533.9000005722046,"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":713.1999998092651,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":713.1999998092651,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1247.1000003814697,"responseStart":0,"secureConnectionStart":0},{"duration":444.29999923706055,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":713.4000005722046,"connectEnd":713.4000005722046,"connectStart":713.4000005722046,"domainLookupEnd":713.4000005722046,"domainLookupStart":713.4000005722046,"fetchStart":713.4000005722046,"redirectEnd":0,"redirectStart":0,"requestStart":713.4000005722046,"responseEnd":1157.6999998092651,"responseStart":1157.6999998092651,"secureConnectionStart":713.4000005722046},{"duration":533.8000001907349,"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":713.5,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":713.5,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1247.3000001907349,"responseStart":0,"secureConnectionStart":0},{"duration":444.6000003814697,"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":713.6999998092651,"connectEnd":713.6999998092651,"connectStart":713.6999998092651,"domainLookupEnd":713.6999998092651,"domainLookupStart":713.6999998092651,"fetchStart":713.6999998092651,"redirectEnd":0,"redirectStart":0,"requestStart":713.6999998092651,"responseEnd":1158.3000001907349,"responseStart":1158.3000001907349,"secureConnectionStart":713.6999998092651},{"duration":1616.2000007629395,"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":714.6999998092651,"connectEnd":714.6999998092651,"connectStart":714.6999998092651,"domainLookupEnd":714.6999998092651,"domainLookupStart":714.6999998092651,"fetchStart":714.6999998092651,"redirectEnd":0,"redirectStart":0,"requestStart":714.6999998092651,"responseEnd":2330.9000005722046,"responseStart":2330.9000005722046,"secureConnectionStart":714.6999998092651},{"duration":1617.1000003814697,"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":714.8000001907349,"connectEnd":714.8000001907349,"connectStart":714.8000001907349,"domainLookupEnd":714.8000001907349,"domainLookupStart":714.8000001907349,"fetchStart":714.8000001907349,"redirectEnd":0,"redirectStart":0,"requestStart":714.8000001907349,"responseEnd":2331.9000005722046,"responseStart":2331.9000005722046,"secureConnectionStart":714.8000001907349},{"duration":654.0999994277954,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":1259.6000003814697,"connectEnd":1259.6000003814697,"connectStart":1259.6000003814697,"domainLookupEnd":1259.6000003814697,"domainLookupStart":1259.6000003814697,"fetchStart":1259.6000003814697,"redirectEnd":0,"redirectStart":0,"requestStart":1259.6000003814697,"responseEnd":1913.6999998092651,"responseStart":1913.6999998092651,"secureConnectionStart":1259.6000003814697},{"duration":796,"initiatorType":"script","name":"https://www.google-analytics.com/analytics.js","startTime":1557.5,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":1557.5,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":2353.5,"responseStart":0,"secureConnectionStart":0}],"fetchStart":0,"domainLookupStart":0,"domainLookupEnd":0,"connectStart":0,"connectEnd":0,"requestStart":531,"responseStart":706,"responseEnd":708,"domLoading":709,"domInteractive":2357,"domContentLoadedEventStart":2357,"domContentLoadedEventEnd":2400,"domComplete":2986,"loadEventStart":2986,"loadEventEnd":2987,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":2335.199999809265},{"name":"bigPipe.sidebar-id.end","time":2336},{"name":"bigPipe.activity-panel-pipe-id.start","time":2336.300000190735},{"name":"bigPipe.activity-panel-pipe-id.end","time":2337.6000003814697},{"name":"activityTabFullyLoaded","time":2413.6000003814697}],"measures":[],"correlationId":"c83be1e3e53d5d","effectiveType":"4g","downlink":10,"rtt":0,"serverDuration":114,"dbReadsTimeInMs":24,"dbConnsTimeInMs":34,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}