首页 > 数据库技术 > 详细

mysql数据库默认编码配置

时间:2016-01-02 22:30:18      阅读:185      评论:0      收藏:0      [点我收藏+]

修改my.ini文件

以下添加
[mysql] 
default-character-set=utf8
[mysqld]

character_set_server = utf8
init_connect=‘SET NAMES utf8‘


修改完毕后重新启动后,查看下面的参数。

mysql> show variables like ‘character%‘;
+--------------------------+----------------------------------------+
| Variable_name | Value |
+--------------------------+----------------------------------------+

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


8 rows in set (0.01 sec)

mysql> show variables like ‘coll%‘;
+----------------------+-----------------+
| Variable_name | Value |
+----------------------+-----------------+
| collation_connection | utf8_general_ci |
| collation_database | utf8_general_ci |
| collation_server | utf8_general_ci |
+----------------------+-----------------+
3 rows in set (0.00 sec)

mysql数据库默认编码配置

原文:http://www.cnblogs.com/tumio/p/5095343.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!