Home > Database > Mysql Tutorial > windows环境下Mysql中文乱码问题解决方法_MySQL

windows环境下Mysql中文乱码问题解决方法_MySQL

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-01 13:24:27
Original
957 people have browsed it

bitsCN.com 最近开发项目中又重新拿起了Mysql,在搭建环境的时候遇到了中文乱码问题。下面我把我的解决方式跟大家分享一下

1、通过show VARIABLES like 'character_%'; 显示出来所有的设置项目。把其中的非UTF8的编码都设置成utf8

设置方式如 : set character_set_server=utf8;

2、去mysql 安装目录下找到my.ini文件。设置里面的latin1为utf8

3、另外如果在Java端通信数据的时候发生了乱码的话就response.setCharacterEncoding("utf-8");bitsCN.com

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
Latest Issues
Can Windows be learned?
From 1970-01-01 08:00:00
0
0
0
Install PHP in windows environment
From 1970-01-01 08:00:00
0
0
0
zookeeper extension under windows
From 1970-01-01 08:00:00
0
0
0
Can I play vim happily on Windows?
From 1970-01-01 08:00:00
0
0
0
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template