Home > Database > Mysql Tutorial > body text

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

WBOY
Release: 2016-06-01 13:33:06
Original
772 people have browsed it

bitsCN.com

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

 

最近开发项目中又重新拿起了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
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
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!