Say you want to dump a database, or even all databases, but with just a sample of all the data, say, 10 000 records per table of each of the databases.
Here’s a way to do that:
1 | mysqldump -uroot -p --all-databases --opt --where="1 limit 10000" > all-db-sample.sql |
Reference: http://stackoverflow.com/questions/135835/limiting-the-number-of-records-from-mysqldump