8

I have a MySQL database with about 50 tables and thousands of records in each table. How can I create a dump of the database containing all tables and only 10 records of each table?

Flavio
  • 846
  • 1
  • 9
  • 21
  • I assume from your rep that you have been here for a while to know that such questions won't get answered without a starting point. That's probably why you got downvoted, I didn't downvote you though. –  Dec 21 '13 at 14:05
  • 1
    I don't understand the downvotes. I have a database that I want to export using phpMyAdmin. With phpMyAdmin I can select "Dump some row(s)" only if I export a single table. How could I possibly export all tables at once and select "Dump some row(s)" at the same time? – Flavio Dec 21 '13 at 14:23
  • 2
    @flavio I up voted you, because I, myself, am got stuck on this issue once and I deem it a reasonable question. – Syntax Error Apr 30 '15 at 13:23

1 Answers1

5

In phpMyAdmin, you will have to export table by table. For each table, click on Export, then choose "Export method custom", choose "dump some rows" and write 10 as the number of rows.

I hope that there are no relations between your tables, as you might be missing some foreign key values when reimporting.

Marc Delisle
  • 8,879
  • 3
  • 29
  • 29