Code: Select all
mysqldump db_namemysqldump sends the table dumps sorted alphabetically, for example:
Code: Select all
AccessLog
Groups
GroupUserConnect
UsersERROR!
I solve this by listing the tables in the shell script in the correct order:
Code: Select all
mysqldump db_name AccessLog Users Groups GroupUserConnectBUT, since development is ongoing, I might add some tables to the database which I might forget to add to that backup dump shell script... INTEGRITY VIOLATION!
Is there any way of getting mysqldump to take sorting actions for the dump based on foreign key information, so that complete database dumps will automatically always be correct?