mysql 5.7修改字符集
2016-09-29 13:37
387 查看
摘要: 5.7 不支持配置文件中mysqld字段不支持default-character-set=utf8
For the recent version of MySQL,
causes a problem. It's deprecated I think.
As Justin Ball says in "Upgrade to MySQL 5.5.12 and now MySQL won’t start, you should:
Remove that directive and you should be good.
Then your configuration file ('/etc/my.cnf' for example) should look like that:
Restart MySQL.
For making sure, your MySQL is UTF-8, run the following queries in your MySQL prompt:
First query:
Second query:
For the recent version of MySQL,
default-character-set = utf8
causes a problem. It's deprecated I think.
As Justin Ball says in "Upgrade to MySQL 5.5.12 and now MySQL won’t start, you should:
Remove that directive and you should be good.
Then your configuration file ('/etc/my.cnf' for example) should look like that:
[mysqld] collation-server = utf8_unicode_ci init-connect='SET NAMES utf8' character-set-server = utf8
Restart MySQL.
For making sure, your MySQL is UTF-8, run the following queries in your MySQL prompt:
First query:
mysql> show variables like 'char%';The output should look like:
+--------------------------+---------------------------------+ | 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 | | character_sets_dir | /usr/local/mysql/share/charsets/| +--------------------------+---------------------------------+
Second query:
mysql> show variables like 'collation%';And the query output is:
+----------------------+-----------------+ | Variable_name | Value | +----------------------+-----------------+ | collation_connection | utf8_general_ci | | collation_database | utf8_unicode_ci | | collation_server | utf8_unicode_ci | +----------------------+-----------------+
相关文章推荐
- Mysql 5.7 for Mac永久修改默认字符集(解决乱码问题)
- ubutun mysql 5.7 修改默认字符集为utf8 ,解决xshell连接显示乱码问题
- linux mysql 5.7 修改默认字符集为utf8
- MySql 5.7中添加用户,新建数据库,用户授权,删除用户,修改密码,导入导出sql文件,设置字符集
- Linux 修改MySQL 5.7默认字符集为UTF-8
- mysql 如何修改字符集
- Liunx下修改MySQL字符集
- linux(fc9)下mysql字符集的修改
- 查看並修改 mysql 數據庫的字符集為 UTF8
- linux下mysql字符集的修改
- MySQL查看和修改数据库的字符集
- 查看当前mysql字符集的参数并修改
- suse linux 下MYSQL 修改默认字符集
- MySQL如何修改表格的字符集,如何修改某个字段的字符集
- 修改mysql字符集编码 分类: 数据库 2010-07-27 11:02 1424人阅读 评论(0) 收藏
- 修改mysql的默认字符集
- 修改Mysql中数据库的字符集
- MySQL字符集问题解决方法(包括改配置文件、命令行修改和JDBC的问题)
- mysql 不能插入中文的解决办法,修改mysql的字符集,操作见蓝色字体部分
- MySQL字符集修改命令