Convert CHARACTER SET in mysql

To convert the database into different character set is easy with a single line command, if you want to convert only the database character set just follow the command:

ALTER DATABASE db_name DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;

 

But this just change the character set of your database not the existing table if you want to convert the character of your tables too then simply follow the command to convert the character set of your database table:

ALTER TABLE table_name CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;

 

Posted by Jogesh Sharma

Jogesh Sharma is a web developer and blogger who loves all the things design and the technology, He love all the things having to do with PHP, WordPress, Joomla, Magento, Durpal, Codeigniter, jQuery, HTML5 etc. He is the author of this blog.