Preparing Your Installation for Upgrade FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME IN (SELECT LEFT(SUBSTR(ID,INSTR(ID,’/’)+1), INSTR(SUBSTR(ID,INSTR(ID,’/’)+1),’_ibfk_’)-1) FROM INFORMATION_SCHEMA.INNODB_SYS_FOREIGN WHERE LENGTH(SUBSTR(ID,INSTR(ID,’/’)+1))>64); For a table with a constraint name that exceeds 64 characters, drop the constraint and add it back with constraint name that does not exceed 64 characters (use  ALTER TABLE ). 6. There must be no obsolete SQL modes defined by  sql_mode  system variable. Attempting to use an obsolete SQL mode prevents MySQL 8.0 from starting. Applications that use obsolete SQL modes should be revised to avoid them. For information about SQL modes removed in MySQL 8.0, see Server Changes. 7. There must be no views with explicitly defined columns names that exceed 64 characters (views with column names up to 255 characters were permitted in MySQL 5.7). To avoid upgrade errors, such views should be altered before upgrading. Currently, the only method of identify views with column names that exceed 64 characters is to inspect the view definition using  SHOW CREATE VIEW . You can also inspect view definitions by querying the  INFORMATION_SCHEMA.VIEWS  table. 8. There must be no tables or stored procedures with individual  ENUM  or  SET  column elements that exceed 255 characters or 1020 bytes in length. Prior to MySQL 8.0, the maximum combined length of ENUM  or  SET  column elements was 64K. In MySQL 8.0, the maximum character length of an individual ENUM  or  SET  column element is 255 characters, and the maximum byte length is 1020 bytes. (The 1020 byte limit supports multitibyte character sets). Before upgrading to MySQL 8.0, modify any  ENUM or  SET  column elements that exceed the new limits. Failing to do so causes the upgrade to fail with an error. 9. Before upgrading to MySQL 8.0.13 or higher, there must be no table partitions that reside in shared InnoDB  tablespaces, which include the system tablespace and general tablespaces. Identify table partitions in shared tablespaces by querying  INFORMATION_SCHEMA : 10. There must be no queries and stored program definitions from MySQL 8.0.12 or lower that use  ASC  or DESC  qualifiers for  GROUP BY  clauses. Otherwise, upgrading to MySQL 8.0.13 or higher may fail, as may replicating to MySQL 8.0.13 or higher replica servers. For additional details, see SQL Changes. 11. Your MySQL 5.7 installation must not use features that are not supported by MySQL 8.0. Any changes here are necessarily installation specific, but the following example illustrates the kind of thing to look for: Some server startup options and system variables have been removed in MySQL 8.0. See Features Removed in MySQL 8.0, and Section 1.4, “Server and Status Variables and Options Added, If upgrading from MySQL 5.7, run this query: SELECT DISTINCT NAME, SPACE, SPACE_TYPE FROM INFORMATION_SCHEMA.INNODB_SYS_TABLES WHERE NAME LIKE ’%#P#%’ AND SPACE_TYPE NOT LIKE ’Single’; SELECT DISTINCT NAME, SPACE, SPACE_TYPE FROM INFORMATION_SCHEMA.INNODB_TABLES WHERE NAME LIKE ’%#P#%’ AND SPACE_TYPE NOT LIKE ’Single’; ALTER TABLE  table_name  REORGANIZE PARTITION  partition_name INTO ( partition_definition  TABLESPACE=innodb_file_per_table); If upgrading from an earlier MySQL 8.0 release, run this query: Move table partitions from shared tablespaces to file-per-table tablespaces using  ALTER TABLE ... REORGANIZE PARTITION : 285