ERROR 1273 (HY000) at line 193: Unknown collation: ‘utf8_general_ci’
ERROR 1273 (HY000) at line 193: Unknown collation: ‘utf8_general_ci’
Oh my god it’s some time very pain while restoring the DB. It shows the collation mismatch šÆ
A collation is a set of rules that defines how to compare and sort character strings. Each collationĀ in Mysql belongs to a single character set. Every character set has at least one collation, and most have two or more collations.
The different types are in form of uf8,utf8 etc..
Generally the collation mismatch occurs due to while restoring DB to different Mysql versions( Eg : mysql 5.6 to mariadb 5.5 )
Error
ERROR 1273 (HY000) at line 193: Unknown collation: 'utf8_general_ci'
How to solve..? it’s simple. We need to manually remove the collation using sed, Here we go
sed -i 's/utf8/utf8/g' your_file.sql sed -i 's/utf8_general_ci/utf8_general_ci/g' your_file.sql sed -i 's/utf8_general_ci/utf8_general_ci/g' your_file.sql
I hope this write up helpful to you š
This is a great tip particularly to those fresh to the blogosphere. Brief but very precise information⦠Thanks for sharing this one. A must read post!