更改數據庫編碼命令 修改字符集的方法,就是使用mysql的命令
mysql> SET character_set_client = utf8 ; mysql> SET character_set_connection = utf8 ; 使用 mysql> SHOW VARIABLES LIKE ‘character%’;查看,發現數據庫編碼均已改成utf8 +————————–+———————————+ | Variable_name | &#118alue | +————————–+———————————+ | character_set_client | utf8 | | character_set_connection | utf8 | | character_set_database | utf8 | | 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 | &#118alue | +———————-+—————–+ | collation_connection | utf8_general_ci | | collation_database | utf8_general_ci | | collation_server | utf8_general_ci | +———————-+—————–+