Home > Database > Mysql Tutorial > body text

Godaddy还原Mysql数据库后中文乱码解决_MySQL

WBOY
Release: 2016-06-01 13:52:12
Original
1696 people have browsed it

1. 用记事本打开备份好的sql文本,确保文件里的数据是否显示正常。2. 查看此文本的存储格式,一般是ANSI(中文一般指gbk或gb2312)和UTF-8.3. 如果文件的存储格式是ANSI,那么请在sql文件的最顶端添上以下的语句:/*!40101 SET NAMES gbk */;如果文件的存储格式是UTF-8,那么请在sql文件的最顶端添上以下的语句:/*!40101 SET NAMES utf8 */;4. 保存后,再用刚才修改后的sql文件去还原mysql数据库,应该就可以搞定了。

 

我的MYSQL备份文件过大,超过300M,UltraEdit,EditPlus都很难搞定,结果使用WinHex直接修改SQL文件头才搞定的。

 

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!