Altering character set and collation of tables in MySQL

Altering the character set and collation of a table is sometimes not enough. You may have to alter the actual fields in the table to get MySQL to comply in some cases.


ALTER TABLE my_table DEFAULT CHARSET=utf8 COLLATE=utf8_swedish_ci;
ALTER TABLE my_table MODIFY my_field varchar(255) CHARACTER SET utf8 COLLATE utf8_swedish_ci;