[MDEV-8858] Unable to set or change root password Created: 2015-09-27 Updated: 2015-10-23 Resolved: 2015-09-28 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Scripts & Clients |
| Affects Version/s: | 10.0.21 |
| Fix Version/s: | N/A |
| Type: | Bug | Priority: | Blocker |
| Reporter: | Stan Walker | Assignee: | Unassigned |
| Resolution: | Not a Bug | Votes: | 0 |
| Labels: | None | ||
| Environment: |
FC22 |
||
| Attachments: |
|
| Description |
|
I have followed all the steps using mysqld_safe or mysql_secure_installation to try to set (or reset) the root password. I have tried to set it to my preferred password, and to blank. I have tried simple user "root", "root@localhost", and "root@127.0.0.1" singly and in all combinations. The only response I ever get after performing all these steps is "Access denied" either using password YES or NO. This completely prevents me from using the software. |
| Comments |
| Comment by Elena Stepanova [ 2015-09-27 ] | |||||||||||
|
"all the steps" is not particularly helpful for understanding what the problem is.
As a very short approach, without knowing all the details above, I would suggest
If it does not work, please describe when exactly it fails, and what the failure looks like, and also attach your server error log. | |||||||||||
| Comment by Stan Walker [ 2015-09-27 ] | |||||||||||
|
First' the steps; Shutdown the server. If I try to use "SET PASSWORD FOR root@localhost=PASSWORD('');" I get: As for which version, when I do mysql -u root it replies: Single machine, fresh install with a fresh install of FC22. Your suggestion didn't make any difference. I used "Documentation" just because I couldn't find any help in any documentation and have no idea where the problem lies. Where would I find the server error log? | |||||||||||
| Comment by Elena Stepanova [ 2015-09-28 ] | |||||||||||
|
I did not get the last part of "the steps". When you connect to the server running with skip-grant-tables, run
Find your error log by the path you selected as @@log_error. | |||||||||||
| Comment by Stan Walker [ 2015-09-28 ] | |||||||||||
|
I get the error on trying to shutdown. At that point the only way I can stop it is to kill it. Doing as you suggested, CHECK TABLE returned:
The user is always the same. I also followed the steps above but first doing "use mysql;" but the results were identical. When I looked at the log, at the bottom was the line:
So I tried doing that. When I just loaded the server, I got access denied. When I instead used skip_grant_tables, it would run, but there were lots of errors (see attached log). It seems that, aside from many files having the wrong structure, there is also at least one file missing at ./mysql/proc.MYI. Hoping this helps! mariadb.log | |||||||||||
| Comment by Elena Stepanova [ 2015-09-28 ] | |||||||||||
|
Something very bad happened to your data directory. Possibly there were some remains of an old one on the machine, or maybe cleanup failed to happen, or something. Anyway, not only some system tables are missing and some have an old structures, but also some system data is missing. Since you don't have any root users, quite obviously you won't be able to connect as one. mysql_upgrade won't help here. I recommend re-running mysql_install_db. Since you expected it to be a clean installation, there should be no data that you would lose; just erase the contents of your datadir /var/lib/mysql/* (but better keep the empty folder itself). If you are unsure whether there is anything potentially useful for you, make a backup first. If mysql_install_db fails, please paste the errors. | |||||||||||
| Comment by Stan Walker [ 2015-09-28 ] | |||||||||||
|
Thank you!! That fixed it! Thank you again. | |||||||||||
| Comment by Elena Stepanova [ 2015-09-28 ] | |||||||||||
|
No problem, things happen. |