Home > Database > Mysql Tutorial > Window7命令行MySQL中文乱码的问题_MySQL

Window7命令行MySQL中文乱码的问题_MySQL

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-01 13:39:33
Original
1188 people have browsed it

bitsCN.com
Window7命令行MySQL中文乱码的问题 由于Win7命令行窗口使用GBK编码,而MySQL服务器编码被设置成了utf8,所以默认情况下显示中文字符会出现乱码   解决方法有如下两种: 一、先用mysql命令连接MySQL服务器,      > mysql -uroot -p     mysql>set names gbk;     可通过mysql>show variables like 'charac%';查看mysql中当前编码 修改前:    
Window7命令行MySQL中文乱码的问题_MySQL 修改后: Window7命令行MySQL中文乱码的问题_MySQL 二、连接MySQL时添加参数,mysql -uroot -p --default-character-set=gbk
  bitsCN.com

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template