Tag: MySQL Unknown collation

  • MySQL Unknown collation: utf8mb4_unicode_520_ci

    When i restore a MySQL database backup taken on MairaDB 10 on MySQL 5.5, i get error

    root@48b55e4d9b35:/home/boby# mysql -u root -pflashwebhost wp < wp.sql
    ERROR 1273 (HY000) at line 356: Unknown collation: 'utf8mb4_unicode_520_ci'
    root@48b55e4d9b35:/home/boby# 
    

    To fix this, i changed all instance of utf8mb4_unicode_520_ci in the SQL backup file with utf8mb4_unicode_ci with sed.

    sed -i 's/utf8mb4_unicode_520_ci/utf8mb4_unicode_ci/g'  wp.sql
    

    mysql