0
mysqldump --host=localhost --user=root --password=sysadmin --no-data test > "C:\test1\ttt.dump";

This the command that i fire to create dump from mysql database , that's working fine and create dump with no data.

but I want some table with data , this command create dump with table that all are blank.

3
  • 7
    Removing the no-data switch would be a wild guess of mine. Commented Sep 27, 2010 at 7:25
  • @Bobby: How about making that an answer so you can collect points for it? Commented Sep 27, 2010 at 7:37
  • 1
    @Aaron Digulla: I was not sure if it is an answer. The description of the flag is a little vague. Commented Sep 27, 2010 at 8:20

3 Answers 3

4

Removing the no-data switch would be a wild guess of mine.

Sign up to request clarification or add additional context in comments.

Comments

2

You can create dump of whole db using this command

     mysqldump -uUserName -pPassword --add-drop-database --add-drop-table --hex-blob SchemaName > FileName.sql

Just enter proper UserName,Password SchemaName and filename.

Comments

0

There is no possibility to do it with 1 command, but theres a way to get creative.

  1. Dump the database without data
  2. Dump only the tables you want with data

Now you have 2 options:

  • Open the second dumpfile in editor and use find/replace option to replace CREATE TABLE with CREATE TABLE IF NOT EXISTS or
  • When importing the second file with data use a --force option when importing the dump file

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.