Mysql error ERROR 1273 (HY000) : Unknown collation: ‘utf8mb4_unicode_520_ci’ solved

Windows Articles

How to increase privacy in Windows 10.

Hello! Without a doubt the time of use of electronic devices has increased lately. Indeed, with the limitations imposed by the COVID-19...

How to install Java 15 on OpenSUSE 15.2?

Recently Java 15 has been released with interesting new features in the accounting field and introducing many security patches. In spite of...

How to install Redis on CentOS 8?

Hello, friends in this post, we will show you how to install Redis on CentOS 8 As we well...

How to enable and disable startup applications in Windows 10

Hello! Windows 10 is an attractive and very easy to use system. However, some criticism has come for being too "heavy". That...

How to install Oracle Java 15 on Ubuntu 20.04 / 18.04?

Hello, friends. We know that Java is one of the most popular programming languages and now it's version 15. So in this...
Avatar
Mel Khamlichi
Webmaster and technical Director at Osradar.com Linux/Unix Guru Technology and hardware addicted Location : Amsterdam Netherlands

In my daily tests, i was testing to restore mysql database from debian9 to centos7. its not really cool because the version release of mysql on Debian is higher then Centos,

i did small research and found the solution, and i though maybe its fine to share it with people in this blog.

The Problem:

[root@localhost ~]# mysql -u root -p osradar < osradar.sql
Enter password:
ERROR 1273 (HY000) at line 25: Unknown collation: 'utf8mb4_unicode_520_ci'

Some times you  get this error :

1273 - Unknown collation: 'utf8mb4_unicode_ci'

Solution:

Please follow the bellow steps:

[root@localhost ~]# sed -i 's/utf8mb4/utf8/g' osradar.sql
[root@localhost ~]# sed -i 's/utf8_unicode_ci/utf8_general_ci/g' osradar.sql
[root@localhost ~]# sed -i 's/utf8_unicode_520_ci/utf8_general_ci/g' osradar.sql

osradar.sql is my MySQL database

Restore the Database now

[root@localhost ~]# mysql -u root -p
Enter password:
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 23
Server version: 5.5.56-MariaDB MariaDB Server

Copyright (c) 2000, 2017, Oracle, MariaDB Corporation Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

MariaDB [(none)]> use osradar;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed
MariaDB [osradar]> show tables;
+------------------------+
| Tables_in_osradar |
+------------------------+
| wp_commentmeta |

Please share your experience with this solution on the comments bellow.

More articles

1 COMMENT

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Latest article

How to increase privacy in Windows 10.

Hello! Without a doubt the time of use of electronic devices has increased lately. Indeed, with the limitations imposed by the COVID-19...

How to install Java 15 on OpenSUSE 15.2?

Recently Java 15 has been released with interesting new features in the accounting field and introducing many security patches. In spite of...

How to install Redis on CentOS 8?

Hello, friends in this post, we will show you how to install Redis on CentOS 8 As we well...

How to enable and disable startup applications in Windows 10

Hello! Windows 10 is an attractive and very easy to use system. However, some criticism has come for being too "heavy". That...

How to install Oracle Java 15 on Ubuntu 20.04 / 18.04?

Hello, friends. We know that Java is one of the most popular programming languages and now it's version 15. So in this...
x