Home  >  Article  >  Database  >  Mysql Source导入时出现乱码问题_MySQL

Mysql Source导入时出现乱码问题_MySQL

WBOY
WBOYOriginal
2016-06-01 13:56:461005browse

1、确定数据库默认编码,比如编码为gbk,将读入途径编码同样设为gbk,命令为:
           set names gbk;
2、source d:/20080613.sql 导入数据。验证数据库中的数据是否存在乱码。

3、如果仍然存在乱码问题,这时候就要考虑改变导入文件的编码,试着导入,直至没有乱码出现。

网页数据存入乱码问题依照以上方法同样可以解决。可将网页编码改为与数据库相同的编码。问题自然解决。

Statement:
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