When restoring a MySQL database backup from a newer version to an older version, you may encounter issues due to differences in database collation.
The MySQL server running on the destination is an older version than the source, which means it doesn't contain the required database collation.
To resolve this issue, you need to make a small tweak to the backup file. Follow these steps:
- Open the database backup file in a text editor.
- Replace the following strings:
utf8mb4_0900_ai_ci
withutf8mb4_general_ci
CHARSET=utf8mb4
withCHARSET=utf8
Replace the following line:
ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
With
ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;