On my local WAMP server, I have a WordPress website. However, when I try to upload the database to a live server, I receive an error.
#1273 – Unknown collation: ‘utf8mb4_unicode_520_ci’
Any assistance would be much appreciated!
Asked by Shishil Patel
This error appears to be caused by the fact that the local server and the live server are running different versions of MySQL. To resolve this, follow these steps:
Hope that helps
Answered by Sabba Keynejad
You can remedy this problem by locating
ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_520_ci;
and replacing it with in your.sql file
ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;
Answered by savani sandip
My new server was running MySQL 5.5, whereas the old server was running MySQL 5.6. So, when I tried to import the.sql file I’d exported from my old server, I got this problem.
utf8mb4 unicode 520 ci is not supported in MySQL 5.5, but it is in MySQL 5.6.
The error was resolved by upgrading to MySQL 5.6 on the new server!
If you want to keep MySQL 5.5, create a copy of your exported.sql file and replace utf8mb4unicode520 ci and utf8mb4 unicode 520 ci… with utf8mb4 unicode ci. – Import the.sql file that has been changed.
Answered by SherylHohman
In your text editor, open the sql file;
1. Type utf8mb4 unicode ci into your search engine. utf8 general ci should be replaced. (Replace everything)
2. Type in utf8mb4 unicode 520 ci in the search box. utf8 general ci should be replaced. (Replace everything)
3. Type utf8mb4 into the search box. utf8 should be used instead (Replace All)
Save and upload!
Answered by VUUB
sed -i 's/utf8mb4_unicode_520_ci/utf8mb4_unicode_ci/g' your_sql_file.sql
Answered by Scard
Post is based on https://stackoverflow.com/questions/42385099/1273-unknown-collation-utf8mb4-unicode-520-ci