[MDEV-14450] Root password lost on restart; can't log in afterward. Created: 2017-11-20 Updated: 2017-11-21 Resolved: 2017-11-21 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Authentication and Privilege System |
| Affects Version/s: | None |
| Fix Version/s: | N/A |
| Type: | Bug | Priority: | Major |
| Reporter: | Marcus Hoffman | Assignee: | Unassigned |
| Resolution: | Not a Bug | Votes: | 0 |
| Labels: | None | ||
| Description |
|
This is reproducible on AltLinux and Ubuntu 16.04. MariaDB version: Steps: 1) Install MariaDB as normal (apt-get install mariadb, or use aptitude)
So far as I can tell, this version of MariaDB literally will lose the root password in a way that requires reinstallation. Unless there's something obvious here that I'm missing? |
| Comments |
| Comment by Elena Stepanova [ 2017-11-20 ] |
|
For the proper password resetting procedure, please check various instructions and manuals. For example, this one, since you're on Ubuntu: For what happens with the password to begin with – I don't know how AltLinux builds and packages MariaDB, but Debian (and Ubuntu, I believe) in their packages configure local root with unix_socket plugin authentication. It means that the password for the local root is ignored, but you can only login if you are a system root, e.g. under sudo. To check if it's the case, try to connect as sudo mysql -uroot, and to confirm further, run select user, host, plugin from mysql.user where user = 'root'. If the user is configured to be authenticated via unix_socket, just changing the password won't help, you also need to unset unix_socket plugin in mysql.user table. However, keep in mind that if the installation is indeed configured this way, then probably startup/shutdown/monitoring scripts rely on it, and they might stop working if you change it. |
| Comment by Marcus Hoffman [ 2017-11-21 ] |
|
This was a total error on my part- part of our bootstrapping left some errata that made MySQL wipe the user table. Please close the ticket! |