14

I have a mysql 8.0 that I exported using mysqldump. I am trying to import it onto a Mariadb 10.4 database with phpmyadmin, both are the most current versions. Each time I do it though, I get:

Error: Unknown collation utf8mb4_0900_ai_ci

Then I went back into the sql file and replaced utf8mb4_0900_ai_ci with utf8mb4_general_ci, but then it says there are errors with various CREATE VIEW sql statements. Are there any other quick, error free fixes I can try?

4
  • 3
    The fix(es) would be quicker in coming if you provide the SHOW CREATE VIEW. MySQL 8 has a lot of enhancements that may not transfer to MariaDB. I would recommend utf8mb4_unicode_520_ci as being a compromise between 'general' and '0900'.
    – Rick James
    Sep 17, 2019 at 0:49
  • If the keyword VISIBLE shows up as an error, simply remove it.
    – Rick James
    Sep 17, 2019 at 0:50
  • Another thing to try - may or may not work - is using MariaDB's mysqldump to create the SQL dump file.
    – dbdemon
    Sep 17, 2019 at 10:40
  • Worked for me too @RickJames thank you!
    – Yannis P.
    Sep 19, 2020 at 10:37

1 Answer 1

8

I've solved my issue by replacing all occurrences of utf8mb4_0900_ai_ci with utf8mb4_general_ci in my SQL dump file.

1
  • _general_ci is not good to use, it's not very unicode compliant. A better replacement at time of writing would be utf8_unicode_520_ci May 13 at 1:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.