David Blomstrom <[EMAIL PROTECTED]> wrote:
> --- Egor Egorov <[EMAIL PROTECTED]> wrote:
>> David Blomstrom <[EMAIL PROTECTED]> wrote:
>> > --- "Robert A. Rosenberg" <[EMAIL PROTECTED]>
>> wrote:
>> >> You just got caught with the old Referential
>> >> Integrity Gotcha. It 
>> >> will not allow you to create countries since
>> >> statesarticles does not 
>> >> (yet) exist.
>> >> 
>> >> The fix is to temporally turn off RI during the
>> >> load. Put this 
>> >> command at the start of your file:
>> >> 
>> >> SET FOREIGN_KEY_CHECKS = 0;
>> >> 
>> >> and this one at the end:
>> >> 
>> >> SET FOREIGN_KEY_CHECKS = 1;
>> >> 
>> >> and it will work.
>> > 
>> 
>> You should put these lines to the dump file that
>> contains CREATE TABLE statements, not to the *.frm
>> files. Then load tables.
>> 
>> If you use command-line client you can do:
>> 
>> mysql> SET FOREIGN_KEY_CHECKS = 0;
>> mysql> SOURCE file_name;
>> mysql> SET FOREIGN_KEY_CHECKS = 1;
> 
> Does anyone on this list know...
> 
> 1. Can I also open the file with Notepad and insert
> the statements?

Yes.

> 
> 2. Where's the location of this dump file?
> 

Where did you save it?

> 3. After I import my SQL file online, do I have to
> then change the file back, deleting the two statements
> I added?

Up to you. If you plan to reuse this dump file, you can keep SET FOREIGN_KEY_CHECKS 
statements too.

> 
> I'm leery of using the command-client, because it's
> unfamiliar to me, and I'm worried about making a major
> mistake.



-- 
For technical support contracts, goto https://order.mysql.com/?ref=ensita
This email is sponsored by Ensita.net http://www.ensita.net/
   __  ___     ___ ____  __
  /  |/  /_ __/ __/ __ \/ /    Egor Egorov
 / /|_/ / // /\ \/ /_/ / /__   [EMAIL PROTECTED]
/_/  /_/\_, /___/\___\_\___/   MySQL AB / Ensita.net
       <___/   www.mysql.com




-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to