Home > Database > Mysql Tutorial > body text

MySQL4到MySQL5转移要点

WBOY
Release: 2016-06-07 16:52:30
Original
891 people have browsed it

例子:MySQL4的数据转移到MySQL5中,数据的格式为utf81.先把数据表的结构给导出来。先在MySQL5中建立数据库,设置编码为utf8_gen

例子:MySQL4的数据转移到MySQL5中,数据的格式为utf8

1.先把数据表的结构给导出来。先在MySQL5中建立数据库,设置编码为utf8_general_ci ,,然后导入MySQL5。

2.导出数据,然后用UltraEdit打开,再顶上加入SET NAMES UTF8;

3.命令导入:MySQL -h localhost -u root -p 数据库名

PS:千万不用记事本打开加入SET NAMES UTF8。因为记事本还会在文件的头加入一个不知名的符号,这个符号还是看不到的。

linux

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!