Because the DDL of MySQL 5.7 is not atomic, temporary files are generated. First, deal with these temporary files, then check the upgrade, and finally upgrade.