MySQL Shell includes utilities for working with MySQL. To access
the utilities use the util
global object, which
includes the
checkForServerUpgrade(
operation that
enables you to verify server instances are suitable for upgrade to
MySQL 8. If you issue instance
[,password]
)checkForServerUpgrade()
without specifying an instance
, the
instance currently connected to the global session is checked.
Provide the password for the user either as part of the connection
details or as the second element passed to the operation. To verify
the server at URI type string
user@example.com:3306
issue:
mysqlsh> util.checkForServerUpgrade('user@example.com:3306', 'password')
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 example.com:3306 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
8) Usage of obsolete MAXDB sql_mode flag
No issues found
9) Usage of obsolete sql_mode flags
No issues found
10) Usage of partitioned tables in shared tablespaces
No issues found
11) Usage of removed functions
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 found1
if warnings were found2
if errors were found