Click here to Skip to main content
12,953,263 members (57,367 online)
Rate this:
Please Sign up or sign in to vote.
See more:

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.
Posted 11-Mar-12 6:46am
Rate this: bad
Please Sign up or sign in to vote.

Solution 1

"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?
pyiannakis 12-Mar-12 5:07am
Hi Berhard,

Thank you for your answer. Yes this is the problem. The version of MYSQL I am using is 5.0.18. tested with 5.5 and mysqldump works

Thank you so much
Rate this: bad
Please Sign up or sign in to vote.

Solution 3

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;

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

    Print Answers RSS
Top Experts
Last 24hrsThis month
OriginalGriff 6,429
CHill60 3,490
Maciej Los 3,103
Jochen Arndt 1,975
ppolymorphe 1,920

Advertise | Privacy | Mobile
Web02 | 2.8.170525.1 | Last Updated 2 May 2012
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100