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 <[EMAIL PROTECTED]>
To: "Jannie Qu" <[EMAIL PROTECTED]>, [EMAIL PROTECTED]
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
---------------------------------------------------------------------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php