When I re-insert dumped data with "mysql < file.sql", I can simply put
"set foreign_key_checks=0;" at the beginning of the file and this works
How can I achieve this when inserting a text file that is read with
I tried to put the mentioned sql-statement in the txt-file, but this
does not affect anything.
One of my developers accidently dropped a table yesterday which had to
be re-created from a dump.
I was sort of lucky as the table was in a not too large database, so I
could just open the dumpfile of that database and get the lines I needed
to recreate the table and data.
If I imagine this happened on a larger database which results in
several-GB-size dumpfiles, it would have taken MUCH longer to get that
So now I'm playing with "mysqldump --tab" which gives nice per-table
data and structure files.
So if there's any other well-known solution for per-table dumpfiles, let
me know. I'm not too keen on writing something myself right now.
Thanks for your help.