Bug #71548 5.7.3 upgrade documentation and mysql_upgrade (--skip-grant-tables)
Submitted: 1 Feb 2014 10:23 Modified: 12 Feb 2014 16:15
Reporter: Simon Mudd (OCA) Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Security: Privileges Severity:S3 (Non-critical)
Version:5.7.3 OS:Any
Assigned to: Paul DuBois CPU Architecture:Any
Tags: windmill

[1 Feb 2014 10:23] Simon Mudd
Description:
A recent up grade from 5.7.1 to 5.7.3 showed me that I could no longer access the database. This is needed to run mysql_upgrade. Therefore the release notes for mysql_upgrade (at least for 5.7) should probably state that after an upgrade and prior to running mysql_upgrade the server should be started with --skip-grant-tables to ensure access to the server works even if the grant tables change.

How to repeat:
install 5.7.1 (I did this from an rpm)
upgrade to 5.7.3 (again from an rpm)

start mysql and notice you can't login.
restart mysql with /etc/init.d/mysql start --skip-grant-tables

Then you can access the server and can run mysql_upgrade. 

See: also http://dev.mysql.com/doc/refman/5.7/en/mysql-upgrade.html which makes no mention of --skip-grant-tables or how to start mysql prior to running mysql_upgrade.

Suggested fix:
This requirement should be more carefully documented as it's not immediately obvious what the problem is. I noticed in logging from the mysql server that users which normally connected to MySQL for monitoring were not able to login either so the changes to the grants tables here are significant.
[1 Feb 2014 10:32] Simon Mudd
This seems to be related to a change in 5.7.2, and I see that  http://dev.mysql.com/doc/relnotes/mysql/5.7/en/news-5-7-2.html does mention that a mysql_upgrade with --skip-grant-tables is needed.

However, the mysql 5.7 mysql_upgrade page does not mention this and anyone who plans on upgrading from an older version is going to bump into this issue so it's good to make this requirement clearer in http://dev.mysql.com/doc/refman/5.7/en/mysql-upgrade.html.
[3 Feb 2014 12:18] MySQL Verification Team
Hello Simon,

Thank you for the bug report.
Verified as described.

Thanks,
Umesh
[12 Feb 2014 16:15] Paul DuBois
Thank you for your bug report. This issue has been addressed in the documentation. The updated documentation will appear on our website shortly, and will be included in the next release of the relevant products.