Documentation Home
MySQL 8.0 Reference Manual
Related Documentation Download this Manual
PDF (US Ltr) - 37.7Mb
PDF (A4) - 37.7Mb
PDF (RPM) - 33.8Mb
HTML Download (TGZ) - 8.4Mb
HTML Download (Zip) - 8.4Mb
HTML Download (RPM) - 7.3Mb
Man Pages (TGZ) - 130.0Kb
Man Pages (Zip) - 185.6Kb
Info (Gzip) - 3.3Mb
Info (Zip) - 3.3Mb

MySQL 8.0 Reference Manual  /  MySQL Shell User Guide  /  MySQL Shell Utilities

Pre-General Availability Draft: 2018-02-16

19.5 MySQL Shell Utilities

MySQL Shell includes utilities for working with MySQL. To access the utilities use the util global object, which includes the checkForServerUpgrade(instance) operation that enables you to verify server instances are suitable for upgrade to MySQL 8. If you issue checkForServerUpgrade() without specifying an instance, the instance currently connected to the global session is checked. To verify the server at URI type string issue:

mysqlsh> util.checkForServerUpgrade('')

MySQL Shell connects to the server instance and tests the settings described at Verifying Upgrade Prerequisites for Your MySQL 5.7 Installation. For example:

The MySQL server at will now be checked for compatibility issues for upgrade to MySQL 8.0...
MySQL version: 5.7.21 - MySQL Community Server (GPL)

1) Usage of db objects with names conflicting with reserved keywords in 8.0
No issues found

2) Usage of utf8mb3 charset
No issues found

3) Usage of use ZEROFILL/display length type attributes
No issues found

4) Issues reported by 'check table x for upgrade' command
No issues found

5) Table names in the mysql schema conflicting with new tables in 8.0
No issues found

6) Usage of old temporal type
No issues found

7) Foreign key constraint names longer than 64 characters
No issues found

No known compatibility errors or issues for upgrading the target server to MySQL 8 were found.

In this case the server instance being checked passed all of the tests and can be upgraded to MySQL 8. A server instance that fails any of the tests requires changes before it can be upgraded to MySQL 8. A server that generates warnings can be upgraded to MySQL 8, but the configuration could be improved to make the server more compatible with MySQL 8. The return value of util.checkForServerUpgrade() is:

  • 0 if no issues found

  • 1 if warnings were found

  • 2 if errors were found

User Comments
Sign Up Login You must be logged in to post a comment.