List:General Discussion« Previous MessageNext Message »
From:Paul DuBois Date:November 21 2002 10:43pm
Subject:Re: How to use foreign_key_check=0 at shell prompt level?
View as plain text  
At 22:40 +0000 11/21/02, Jannie Qu wrote:
>Hi, paul,
>
>I got some error when using:
>
>mysql> set foreign_key_check=0;
>ERROR 1064: You have an error in your SQL syntax near 
>'foreign_key_check=0' at line 1
>mysql> select version();
>+-------------+
>| version()   |
>+-------------+
>| 3.23.53-log |
>+-------------+
>1 row in set (0.00 sec)

Sorry, I write my response using your syntax without checking to see if
it was correct.  It should be "foreign_key_checks", not "foreign_key_check".

>
>
>
>>From: Paul DuBois <paul@stripped>
>>To: "Jannie Qu" <jannie_qu@stripped>, mysql@stripped
>>Subject: Re: How to use foreign_key_check=0 at shell prompt level?
>>Date: Thu, 21 Nov 2002 16:25:04 -0600
>>
>>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