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;