Fix collation issues when moving from Mysql 8 to MariaDB

I am trying to import a SQL dump from a MySql 8.0 server into MariaDB server and getting the following error.
ERROR 1273 (HY000) at line 789299: Unknown collation: ‘utf8mb4_0900_ai_ci’

This happens because utf8mb4_0900_ai_ci is a MySQL 8.0 collation that MariaDB doesn’t support. Fix it by replacing it before importing:

sed -i 's/utf8mb4_0900_ai_ci/utf8mb4_general_ci/g' your_dump.sql

Author: Miyar Es