Home > Database > Mysql Tutorial > body text

MySQL刷库脚本中带中文

WBOY
Release: 2016-06-07 17:13:54
Original
1163 people have browsed it

MySQL刷库脚本中带中文,用MySQL命令登录后刷入数据库后,读取出来出现乱码。

MySQL刷库脚本中带中文,用MySQL命令登录后刷入数据库后,读取出来出现乱码。

出现的情况有可能是下面的原因:

安装完MySQL没有修改客户端连接编码,,默认是latin1,用MySQL命令登录进去直接source,导致刷进去的数据是latin1编码的。

解决方案:

1.MySQL命令登录时加参数

2.修改my.cnf(目录在/etc/my.cnf),在[client]增加如下代码

 

 

 

linux

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
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!