Home > Database > Mysql Tutorial > sql文件导入导出乱码解决_MySQL

sql文件导入导出乱码解决_MySQL

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-01 13:28:48
Original
1572 people have browsed it

bitsCN.com

sql文件导入导出乱码解决

 

今天从windows上导出一个sql执行文件,再倒入到unbutn中,结果出现乱码, 

解决方式 

 

在导出mysql sql执行文件的时候,指定一下编码格式: 

 

代码如下:

 

mysqldump -uroot -p --default-character-set=utf8 mo(dbname) > E://xxxx.sql 
Copy after login

导入的时候OK了

执行如下

代码如下:

mysql -u root -p --default-character-set=utf8 use dbname source /root/newsdata.sql 
Copy after login

 


bitsCN.com
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
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