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.

Advertisement

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

Leave a Reply

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

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Advertisement