Changing mysql Database Encoding to UTF8

You can check the current encoding of your database as follows:

mysql -u virpi -p pim
mysql> SHOW VARIABLES LIKE 'character_set_database';
+------------------------+--------+
| Variable_name          | Value  |
+------------------------+--------+
| character_set_database | latin1 |
+------------------------+--------+

To change the encoding to UTF8, run alter as follows:

alter database pim character set 'utf8';
mysql> show variables like "character_set_database";
+------------------------+-------+
| Variable_name          | Value |
+------------------------+-------+
| character_set_database | utf8  |
+------------------------+-------+
1 row in set (0.00 sec)

EncodingTrouble (last edited 2008-07-18 17:57:07 by DeepaliKhushraj)