This question already has an answer here:
- Backup a sample of a PostgreSQL database 4 answers
I have a mysql production database, with multiple tables. Tables are related with foreign key constraints. I want to make a small test database, by collecting/exporting only a small subset of data from the whole database (i.e. from all tables), so that foreign key constraints are preserved in the data subset.
How can I do that?