Backup Restore Mysql does not insert all tables

2

I have a database MySql , where I performed a backup of all data from a particular database (all data was actually saved within a .sql file) but when I > reset using this file not all bank tables (Total 18, Inserted 14)

Questions:

  • What is the real reason for this problem?
  • How to solve?
  • Obs1: I noticed that the tables were saved in alphabetical order as soon as I noticed a mismatch of Primary and Foreign Keys (insertion of foreigners before the foreign keys) MySQL dump 10.13 Distrib 5.6.21, for Win32 (x86), InnoDB

        
    asked by anonymous 02.09.2015 / 16:08

    1 answer

    2

    If the file in question is not damaged and the error is only (Primary and Foreign Keys), simply execute this procedure in the backup file:

    1 After the command use bancodedados; put the command

    SET FOREIGN_KEY_CHECKS = 0;
    

    To disable the keys, having done the injection at the end place the following command at the end of the script to reactivate the keys

    SET FOREIGN_KEY_CHECKS = 1;
    
        
    15.10.2015 / 21:47