Home > Database > Mysql Tutorial > body text

将MySQL 5.0下的数据导入到低版中_MySQL

WBOY
Release: 2016-06-01 13:52:20
Original
885 people have browsed it

  最近需要将Mysql5.0下的数据库导出,然后导入到mysql 3.23的数据库中,

  我用的如下方法:

  $ mysqldump -u root --skip-comments --compatible=mysql323 --databases db1 db2 db3 > mydump.sql

  在另一台服务器(mysql 3.23.58 )上导入:

  mysql> source /path/mydump.sql

  总是不成功,这样或那样的错误. mysqldump的参数也换过了,没找到合适的。

  几经周折,问题解决:

  呵呵,忘了指定character-set. 因为两边都要指定。

  $ mysqldump -u root --default-character-set=xxxx --skip-comments --compatible=mysql323 --databases db1 > db1.sql

  在另一台服务器(mysql 3.23.58 )上导入:

  $ mysql -u root --default-character-set=xxxx

  mysql> source /path/db1.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!