Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am running mysqldump on Ubuntu Linux (10.0.4 LTS)

my mySQL version info is:

mysql Ver 14.14 Distrib 5.1.41, for debian-linux-gnu (i486) using readline 6.1

I used the following command:

mysql -u username -p dbname > dbname_backup.sql

However when I opened the generated .sql file, I saw that most of the tables had only the schema dumped and in the few cases where the actual data was dumped, only 1 or two records were dumped (there are ATLEAST several tens of records in each table).

Does anyone know what maybe going on?

share|improve this question
mysql -u username -p dbname > dbname_backup.sql ? It should be mysqldump -u username .... – Sacx Mar 19 '11 at 15:38

I think you expect to see a lot of inserts and probably you see only 1 or 2. Is normal, if you look closer you will see 1 or 2 BIG inserts (extended inserts). Extended inserts are multiple row inserts which includes several VALUES lists.

share|improve this answer
Out of curiosity, how many rows do most extended inserts contain? – TheLQ Mar 19 '11 at 15:59
I think mysqldump calculate that depending on how many data is in tables. – Sacx Mar 19 '11 at 16:13

Try passing the full command instead:

mysqldump --databases --result-file=filename.sql mydatabase -u mysqluser -p

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.