Link to home
Start Free TrialLog in
Avatar of Billy Ma
Billy MaFlag for Hong Kong

asked on

How to dump all databases via mysqldump?

How to dump all databases via mysqldump in Windows XP?
I tried
mysqldump -A -h 10.123.123.12 -u username -p > full_database.sql

Why this command only dump the table structure but not the data (record)?

How can I dump everything then?
Avatar of GarbsTheTurtle
GarbsTheTurtle
Flag of United States of America image

Couple questions:
1. What version of MySql is your server running?
2. How are you verifying the contents of the dumped file? Seeing an incomplete import on a second server? Opening the dump file in a text editor on your dektop?
3. If you're opening the text file and viewing the contents, are you seeing all of the CREATE TABLE statements, or just the first one?
4. Have you tried running mysqldump using the --result-file=full_database.sql (or -r full_database.sql) options to mysqldump to ensure your line endings will play properly with your Windows system (assuming the target destination for the dumped file is indeed a Windows machine)?
5. Have you checked the source database to verify there is data to be dumped? (have to ask...)
Avatar of Billy Ma

ASKER

Server version: 4.0.21-standard

Only have something like this is the file
CREATE DATABASE /*!32312 IF NOT EXISTS*/ `fibrecut`;

USE `fibrecut`;

--
-- Current Database: `hub`
--

CREATE DATABASE /*!32312 IF NOT EXISTS*/ `hub`;

USE `hub`;

yes, there is data to be dumped.
ASKER CERTIFIED SOLUTION
Avatar of GarbsTheTurtle
GarbsTheTurtle
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
yes, I can
Curious - what was the resolution?