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

Windows Articles

Configure Samba File share Services with Ubuntu 20.04 LTS

Here, Today! let's discuss samba file share service with Ubuntu 20.04 LTS. If you need to share files between Linux and...

Install Matomo on Ubuntu 20.04

Hello, friends. In this post, you will learn how to install Matomo on Ubuntu 20.04. It's quite useful to measure the traffic...

How to change DNS in Windows 10

Hi! Today we will talk a bit about networks. In fact, we will touch on a topic related to connectivity. Specifically we...

The new Windows 10 file explorer will arrive with 21H2 update.

Hello! Microsoft does not stop working (except at Christmas) to continue polishing to Windows 10. In fact, users are gradually receiving the...

How to create an FTP server in Android

Hello! How are you? Currently sharing files from your PC to Android can be more comfortable and easy, without the need to...
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

Configure Samba File share Services with Ubuntu 20.04 LTS

Here, Today! let's discuss samba file share service with Ubuntu 20.04 LTS. If you need to share files between Linux and...

Install Matomo on Ubuntu 20.04

Hello, friends. In this post, you will learn how to install Matomo on Ubuntu 20.04. It's quite useful to measure the traffic...

How to change DNS in Windows 10

Hi! Today we will talk a bit about networks. In fact, we will touch on a topic related to connectivity. Specifically we...

The new Windows 10 file explorer will arrive with 21H2 update.

Hello! Microsoft does not stop working (except at Christmas) to continue polishing to Windows 10. In fact, users are gradually receiving the...

How to create an FTP server in Android

Hello! How are you? Currently sharing files from your PC to Android can be more comfortable and easy, without the need to...
x