Friday, June 26, 2015

MySQL, Convert database and table to charset UTF-8

Sometime, you get CMS and open source from online but database and table not set UTF-8 so that you can not save data with Vietnamese, Chinese...

We can use this command line of SQL to covert to UTF-8.

ALTER DATABASE databasename CHARACTER SET utf8 COLLATE utf8_unicode_ci; 
ALTER TABLE tablename CONVERT TO CHARACTER SET utf8 COLLATE utf8_unicode_ci;

Good luck to you.

No comments:

Post a Comment