Convert a Mysql database from latin to UTF-8
- by Matthieu
I am converting a website from ISO to UTF-8, so I need to convert the Mysql database too.
On internet, I read various solutions, I don't know wich one to choose.
Do I really need to convert my varchar columns to binary, then to utf8 like that :
ALTER TABLE t MODIFY col BINARY(150);
ALTER TABLE t MODIFY col CHAR(150) CHARACTER SET utf8;
This is long to do that for each column, of each table, of each database.
I have 10 database, wich 20 tables each, wich around 2 - 3 varchar colums (2 queries each column), this gives me around 1000 queries to write ! How come ? How to do ?