Bug #73478 mysqlcheck --skip-database option not clear with mysql_upgrade interaction
Submitted: 5 Aug 2014 19:40 Modified: 17 Feb 2016 19:43
Reporter: Chris Calender Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Documentation Severity:S3 (Non-critical)
Version:5.6 OS:Any
Assigned to: Paul DuBois CPU Architecture:Any
Tags: --skip-database, mysql_upgrade, mysqlcheck

[5 Aug 2014 19:40] Chris Calender
Description:
Per this bug fix:

http://bugs.mysql.com/bug.php?id=68163

There was a --skip-database added to mysqlcheck, which, according to the bug report, is intended to be passed to mysql_upgrade in order to process the tables from 'mysql' schema first, and update them, etc.

However, when I invoke mysql_upgrade with the --skip-database, I receive an error:

shell>mysql_upgrade --skip-database -uroot -pxxx -P3309

mysql_upgrade: unknown variable 'skip-database'

I try "loose", and it allows it, but it does *not* say that the option is passed to "mysqlcheck".

Is this supposed to work?

If so, can this be documented in the manual, and can someone please tell mysql_upgrade?

Or if not, then we can add a note of clarification to bug #68163.

How to repeat:
Try to invoke 5.6.19 mysql_upgrade with --skip-database option as is suggested in bug #68163:

C:\Program Files\MySQL\MySQL Server 5.6\bin>mysql_upgrade --skip-database -uroot -pxxx -P3309 --force
mysql_upgrade: unknown option '--skip-database'

This is MySQL Community 5.6.19 and the mysql_upgrade is also from 5.6.19, windows, 64-bit, tarball.

Suggested fix:
If this should work, mysql_upgrade needs to be informed, and this should be documented.

Otherwise, if this should not work, or is no longer relevant, a simple note (with an explanation) to the old bug report would suffice.
[5 Aug 2014 19:55] Sveta Smirnova
Thank you for the report.

mysql_upgrade does not accept this option. Instead, it adds option --skip-database=mysql when calls mysqlcheck. And we did not promise that this is user job to specify this option to mysql_upgrade, so technically this is not a bug. But I agree that users can also be confused, so verify it. Documentation can be more verbose about this.
[5 Aug 2014 20:14] Chris Calender
Thanks Sveta!

Great to know.  This would also explain why I was seeing mysql_fix_privilege_tables being run before the remaining tables were checked even when I did not specify --loose-skip-database - which is a good thing :).

Best wishes,
Chris
[17 Feb 2016 19:43] Paul DuBois
Revision to Bug#68163 changelog entry (to avoid the impression that mysql_upgrade itself accepts the --skip-database option):

mysql_upgrade adds this option to mysqlcheck commands that it
generates to upgrade the system tables in the mysql database before
tables in other databases: It upgrades the mysql database, then all
databases except the mysql database. This avoids problems that can
occur if user tables are upgraded before the system tables.