Mysql upgrade locks out its root user
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
mysql-5.7 (Ubuntu) |
Won't Fix
|
Undecided
|
Unassigned |
Bug Description
If you have a mysql database with an empty root password (like we have here for development purpose) with mysql 5.6, with the upgrade to 16.04 you'll find yourself locked out on mysql 5.7
The problem is the new feature of mysql-server that generates a temporary password.
Unfortunately, this password is not recorded anywhere, neither in a .mysql_secret file (if the deprecated mysql_install_db script would've been used) which is nowhere on the filesystem, nor in the mysql logs. (Like instead it is on Windows or Red Hat, apparently).
The only solution (aside from wiping the db, and selecting a new password at install time), is to follow the instructions to reset permissions:
http://
(but you won't be able to simply use the --init-file option, due to the apparmor sandboxing of mysqld)
I attached a simple terminal session that demonstrates the issue
ProblemType: Bug
DistroRelease: Ubuntu 16.04
Package: mysql-server 5.7.11-0ubuntu6
ProcVersionSign
Uname: Linux 4.4.0-17-generic x86_64
ApportVersion: 2.20.1-0ubuntu2
Architecture: amd64
CurrentDesktop: Unity
Date: Mon Apr 18 14:34:46 2016
InstallationDate: Installed on 2016-03-07 (42 days ago)
InstallationMedia: Ubuntu 16.04 LTS "Xenial Xerus" - Alpha amd64 (20160304)
Logs.var.
MySQLConf.
[mysqld_safe]
syslog
MySQLVarLibDirL
PackageArchitec
SourcePackage: mysql-5.7
UpgradeStatus: No upgrade log present (probably fresh install)
I just realized that not even the
mysqld_safe --skip-grant-tables --skip-networking
solution will work, since after logging in
ALTER USER 'root'@'localhost' IDENTIFIED BY '';
will fail with
ERROR 1524 (HY000): Plugin 'auth_socket' is not loaded
(the same applies for the old command: `SET PASSWORD FOR 'root'@'localhost' = PASSWORD('');`)
And trying
install plugin auth_socket soname 'auth_socket.so';
will only result in
ERROR 1030 (HY000): Got error 1 from storage engine