使用mysqldump的MYSQL 5无法正常工作 [英] MYSQL 5 using mysqldump not working

查看:135
本文介绍了使用mysqldump的MYSQL 5无法正常工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



使用MYSQL版本3:
mysqldump -r文件.sql -u用户名-p数据库名;

可以将整个数据库转储为.sql文件.同一命令在MYSQL 5中不起作用.

我试图将整个数据库或每个表中的数据都以.xml格式转储为xml文件.我可以使用gui-export表作为xml从MYSQLYOG做到这一点,但是我一直在努力寻找要在命令行中运行以执行转储的命令,包括.sql文件和.xml文件.
我已经搜索了Internet,但还没有找到适用于MYSQL 5的示例

迫切需要帮助.

Hi,

With MYSQL version 3:
mysqldump -r file.sql -u username -p databasename;

would work to dump the entire database as a .sql file. the same command does not work in MYSQL 5.

I''m trying to dump the data as .xml either whole database or each table separately as an xml file. I can do this fine from MYSQLYOG using the gui - export table as xml, but I''m struggling to find the commands to run in command line to do the dump, both .sql file and .xml file.

I have searched the internet and no example I have found has yet to work for MYSQL 5

Help is desperately needed.

推荐答案

来自 http://dev.mysql.com/doc/refman/5.1/en/mysqldump.html [ 您是否真的使用兼容版本?
From http://dev.mysql.com/doc/refman/5.1/en/mysqldump.html[^]:
"mysqldump from MySQL 5.1.21 cannot be used to create dumps from MySQL server 5.1.20 and older. This issue is fixed in MySQL 5.1.22. (Bug #30123)"
Do you really use compatible versions?


我试图从MYSQL运行转储,无法从MYSQL 5.0.18运行mysqldump命令. br/>
即:mysqldump -r dbname.sql -u用户名-p数据库名称;
I was trying to run the dump from MYSQL, you cannot run the mysqldump command from MYSQL 5.0.18.. You need to run from command..

ie: mysqldump -r dbname.sql -u username -p databasename;


这篇关于使用mysqldump的MYSQL 5无法正常工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆