To modify the character set, use the mysql command.
Mysql> SET character_set_client = utf8; mysql> SET character_set_connection = utf8; Use mysql> show variables like 'character % '; view, we found that the database encoding has been changed to utf8 + --------- + | Variable_name | & #118 alue | + --------- + ----------- + | bytes | utf8 | character_set_connection | utf8 | character_set_database | | character_set_filesystem | binary | character_set_results | utf8 | character_set_server | utf8 | character_set_system | utf8 | character_sets_dir | D: "mysql-5.0.37" share "charsets" | + --------- + ----------- + mysql> show variables like 'collation _ % '; + -------- + ------ + | Variable_name | & #118 alue | + -------- + ------ + | collation_connection | utf8_general_ci | collation_database | utf8_general_ci | collation_server | bytes | + -------- + ------ +