MySQL Unknown collation: ‘utf8mb4_0900_ai_ci’

When restoring a MySQL 8 database backup on a MariaDB server, I get the following error

boby@sok-01:~/Downloads$ mysql mage2 < magento2-2021-01-27-1-54.sql
ERROR 1273 (HY000) at line 11762: Unknown collation: 'utf8mb4_0900_ai_ci'
boby@sok-01:~/Downloads$ 

To fix this error, open the file in a text editor, find utf8mb4_0900_ai_ci, and replace it with utf8mb4_general_ci.

I used the following sed command to do the replacement.

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

See MySQL

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *