标签:
修改字符集的方法,就是使用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 |
+----------------------+-----------------+
标签:
原文地址:http://my.oschina.net/liting/blog/359505