0

I have quite large database and if I generate only one file for all inserts for all databases it is too much to handle. I would need separate SQL scripts for inserting data for each table in database.

When I first dumped structure with this command it was perfect, I got one SQL script for each table containing create statements:

mysqldump --user=dbuser --password --no-data --tab=/output/ dbname

If I use same configuration only with other options like --no-create-info, --no-create-db, --extended-insert, --complete-insert like this:

mysqldump --user=dbuser --password \
  --complete-insert --extended-insert \
  --no-create-info --tab=/output/ dbname

I get for each table one empty SQL script and one .txt file with only data (without insert into statement).

Thank you for your help!

tadman
  • 208,517
  • 23
  • 234
  • 262
  • Possible duplicate of [dump all mysql tables into separate files automagically?](https://stackoverflow.com/questions/3669121/dump-all-mysql-tables-into-separate-files-automagically) – Blue Jan 26 '18 at 17:28
  • 1
    You're going to have to iterate over a list of tables and run this command once each time. – tadman Jan 26 '18 at 19:17

0 Answers0