So I was trying to import a MySQL database exported from local evolution car to a alive server as well as I got the mistake thrown yesteryear phpMyAdmin:
#1273 – Unknown collation: ‘utf8mb4_unicode_520_ci’
On roughly systems, the mistake could be: Unknown collation: 'utf8mb4_unicode_ci'
The mistake inward detail:
CREATE TABLE wp_commentmeta
(
meta_id
bigint(20) UNSIGNED NOT NULL,
comment_id
bigint(20) UNSIGNED NOT NULL DEFAULT ‘0’,
meta_key
varchar(255) COLLATE utf8mb4_unicode_520_ci DEFAULT NULL,
meta_value
longtext COLLATE utf8mb4_unicode_520_ci
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_520_ci;
MySQL said: Documentation
#1273 – Unknown collation: ‘utf8mb4_unicode_520_ci’
Cause of the error:
This mistake is commonly caused yesteryear a divergence inward encoding types betwixt the source database as well as the goal database. It usually happens when a database is exported from a newer MySQL database (MySQL 5.5.3 as well as above) which uses utf8mb4, as well as effort to import into an older MySQL version using utf8.
Solution that worked:
On the local machine:
On the local evolution machine, I accessed phpMyAdmin as well as exported the database using the next settings:
- On local evolution machine, access phpMyAdmin
- Select the desired database as well as click Export
- Instead of the default, Select “Custom – display all possible options”
- Scroll down
- Look for “Database organisation or older MySQL server to maximize output compatibility with” as well as inward the dropdown adjacent to it, choose MYSQL40
- Click Export
The SQL file is exported from the local MySql database to the computer.
On the alive server:
- Access the phpMyAdmin on the alive server
- Click Import as well as choose the sql file exported before on the local machine.
The database from the local machin was imported successfully without the mistake #1273 – Unknown collation: ‘utf8mb4_unicode_520_ci’.
Hope this solution is helpful to you.