ubuntukylin_mysql5.7基础 将mysql的默认编码修改为utf8
内容导读
互联网集市收集整理的这篇技术教程文章主要介绍了ubuntukylin_mysql5.7基础 将mysql的默认编码修改为utf8,小编现在分享给大家,供广大互联网技能从业者学习和参考。文章包含4999字,纯文字阅读大概需要8分钟。
内容图文
![ubuntukylin_mysql5.7基础 将mysql的默认编码修改为utf8](/upload/InfoBanner/zyjiaocheng/477/d8dc19d8fe854b0999153b7b0682f54a.jpg)
优秀教程推荐:
http://blog.csdn.net/qq_32144341/article/details/51318390
原来的编码:
xinjin@xjPC:~$ mysql -u root -p Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 10 Server version: 5.7.17-0ubuntu0.16.04.1 (Ubuntu) Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Type ‘help;‘ or ‘\h‘ for help. Type ‘\c‘ to clear the current input statement. mysql> show variables like ‘character%‘; +--------------------------+----------------------------+ | Variable_name | Value | +--------------------------+----------------------------+ | character_set_client | utf8 | | character_set_connection | utf8 | | character_set_database | latin1 | | character_set_filesystem | binary | | character_set_results | utf8 | | character_set_server | latin1 | | character_set_system | utf8 | | character_sets_dir | /usr/share/mysql/charsets/ | +--------------------------+----------------------------+ 8 rows in set (0.01 sec) mysql> exit Bye xinjin@xjPC:~$
修改后的编码:
root@xjPC:~# mysql -u root -p Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 4 Server version: 5.7.17-0ubuntu0.16.04.1 (Ubuntu) Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Type ‘help;‘ or ‘\h‘ for help. Type ‘\c‘ to clear the current input statement. 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 | | character_sets_dir | /usr/share/mysql/charsets/ | +--------------------------+----------------------------+ 8 rows in set (0.00 sec) mysql> exit Bye
操作步骤:
xinjin@xjPC:~$ sudo -s [sudo] xinjin 的密码:
root@xjPC:~# service mysql stop
root@xjPC:~# gedit /etc/mysql/mysql.conf.d/mysqld.cnf
root@xjPC:~# gedit /etc/mysql/conf.d/mysql.cnf
root@xjPC:~# service mysql start
root@xjPC:~# mysql -u root -p Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 4 Server version: 5.7.17-0ubuntu0.16.04.1 (Ubuntu) Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Type ‘help;‘ or ‘\h‘ for help. Type ‘\c‘ to clear the current input statement. 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 | | character_sets_dir | /usr/share/mysql/charsets/ | +--------------------------+----------------------------+ 8 rows in set (0.00 sec) mysql> exit Bye
______________________________________________________________________________________________________
若是您觉得此博文有可以改进的地方或者内容过时了,请评论,我会仔细思考的。
注:此博文仅用于科研学习,如果侵犯到您的权益,请及时告知,我会做出相应的处理。
本文出自 “心静如水,志刚如磐.” 博客,请务必保留此出处http://xinjingzhigang.blog.51cto.com/12262830/1905567
ubuntukylin_mysql5.7基础 将mysql的默认编码修改为utf8
标签:ubuntukylin_mysql5.7基础 将mysql的默认编码修改为utf8
本文系统来源:http://xinjingzhigang.blog.51cto.com/12262830/1905567
内容总结
以上是互联网集市为您收集整理的ubuntukylin_mysql5.7基础 将mysql的默认编码修改为utf8全部内容,希望文章能够帮你解决ubuntukylin_mysql5.7基础 将mysql的默认编码修改为utf8所遇到的程序开发问题。 如果觉得互联网集市技术教程内容还不错,欢迎将互联网集市网站推荐给程序员好友。
内容备注
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 gblab@vip.qq.com 举报,一经查实,本站将立刻删除。
内容手机端
扫描二维码推送至手机访问。