My Sql Errors are common in the web development field. You can see too many errors but “Unknown collation: ‘utf8mb4_unicode_520_ci’” is the error occurs due to the database format.
How to solve Unknown collation: ‘utf8mb4_unicode_520_ci’ ?
This error occurs while import .sql file to new server from your localhost. Your localhost phpmyadmin database format may be varied from your current server that’s y this error occurs.
Follow the steps to solve Unknown collation: ‘utf8mb4_unicode_520_ci’ error
- Login to your localhost phpmyadmin panel and choose the database
- Export the database file
- Open .sql file in your code editor. I recommend using the sublime text editor
- Find utf8mb4_unicode_520_ci
- Replace with utf8_general_ci
- Find utf8mb4
- Replace utf8
- click Replace all. After your successful replacement save the file and go to your new phpmyadmin and import the database by choosing your old .sql file.
- Here i am using my worpress database .sql file to move my wordpress from localhost to new server.
Note: I got information from stack overflow .