For a very fast reload of InnoDB tables you could try this
Mysqldump ....  ...    >dump.sql

Now edit the sql file so that these lines appear at the beginning
SET AUTOCOMMIT=0;
SET FOREIGN_KEY_CHECKS=0;

and add these at the end

SET FOREIGN_KEY_CHECKS=1; (re-enabled the checks)
COMMIT;   (actual commit)
SET AUTOCOMMIT =1; (back to default )

mysql ... ..... ..... <dump.sql

Kishore Jalleda

On 2/2/07, Phil Butterworth <[EMAIL PROTECTED]> wrote:

Hi,
    My problem is that when I use mysqldump, and I get the .sql file, If I
try to load that into mysql, I usually have to edit the file to switch the
create table order, because I get 'Could not create table xyz' when I look
at the file its because of FK constraints being defined in the sql file
before the table and column that is being referenced has been created - Is
their a way to disable constraints for the new tables, then when all the
tables are created the FK's are put into place, so no create table
statement
errors because of FK's, and no editing the sql dump?
Thanks and best regards
Phil

Reply via email to