升级前的检查项
mysqlcheck -u root -pMyNewPass4! --all-databases --check-upgrade
检查存储引擎和分区表
检查是否存在不是使用innodb,ndbcluster存储引擎的表和是否有存在分区表
SELECT TABLE_SCHEMA, TABLE_NAME
FROM INFORMATION_SCHEMA.TABLES
WHERE ENGINE NOT IN (‘innodb’, ‘ndbcluster’)
AND CREATE_OPTIONS LIKE ‘%partitioned%’;
查询所报告的任何表都必须更改为使用 InnoDB或不分区。要将表存储引擎更改为InnoDB,请执行以下语句:
ALTER TABLE table_name ENGINE = INNODB;
ALTER TABLE table_name REMOVE PARTITIONING
检查5.7中的业务表名是否与8.0中的数据字典名冲突
SELECT TABLE_SCHEMA, TABLE_NAME
FROM INFORMATION_SCHEMA.TABLES
WHERE LOWER(TABLE_SCHEMA) = ‘mysql’
and LOWER(TABLE_NAME) IN
(
‘catalogs’,
‘character_sets’,
‘check_constraints’,
‘collations’,
‘column_statistics’,
‘column_type_elements’,
‘columns’,
‘dd_properties’,
‘events’,
‘foreign_key_column_usage’,
‘foreign_keys’,
‘index_column_usage’,
‘index_partitions’,
‘index_stats’,
‘indexes’,
‘parameter_type_elements’,
‘parameters’,
‘resource_groups’,
‘routines’,
‘schemata’,
‘st_spatial_reference_systems’,
‘table_partition_values’,
‘table_partitions’,
‘table_stats’,
‘tables’,
‘tablespace_files’,
‘tablespaces’,
‘triggers’,
‘view_routine_usage’,
‘view_table_usage’
);
查询报告的任何表都必须删除或重命名(使用RENAME TABLE)。这也可能需要更改使用受影响表的应用程序