List:General Discussion« Previous MessageNext Message »
From:Paul DuBois Date:November 21 2002 10:25pm
Subject:Re: How to use foreign_key_check=0 at shell prompt level?
View as plain text  
At 22:10 +0000 11/21/02, Jannie Qu wrote:
>Hi, all,
>
>sql, query.
>
>I try to use a mysqldump file from development database and insert 
>back into production database on another server.
>
>bkp_dbname.sql is copied over to prodution, and I am using the 
>following command at production.
>
>shell> mysql -ujqu -pjqu1234@ dbname < bkp_dbname.sql
>
>File bkp_dbname.sql contains "create table, insert into table..." 
>Tables are all innoDB tables with foreign keys.
>
>How can I disable foreign_key_check at shell prompt.

You can't.  But you can do this instead:

shell> mysql -ujqu -pjqu1234@ dbname
mysql> set foreign_key_check=0;
mysql> source bkp_dbname.sql;
mysql> quit

>
>Background info:
>MySQL 3.23.53 with Innodb enabled on Mac OS 10.1
>
>Thank you,
>jing

Thread
How to use foreign_key_check=0 at shell prompt level?Jannie Qu21 Nov
  • Re: How to use foreign_key_check=0 at shell prompt level?Paul DuBois21 Nov
Re: How to use foreign_key_check=0 at shell prompt level?Paul DuBois21 Nov