Hello.
You may execute "SET FOREIGN_KEY_CHECKS=0;" in mysql and then use "source sql.file;". Run mysql with -B command line option. Terence <[EMAIL PROTECTED]> wrote: > Hi, > > After reading the docs I realise that in order to use mysqldump with > innodb tables i need to include > > SET FOREIGN_KEY_CHECKS=0; > > at the top of my dump file. Is there anyway to do this when my slave > starts up or some other way. The dump file is huge and it takes ages to > open and put the line at the top. (In trying to setup replication I am > trying all ways to reduce the downtime of the master while I get a > snapshot onto the slave) > > I use > ./bin/mysql -u root -p < /tmp/dump.sql > to get the contents into my slave. > > Something like this might work: > ./bin/mysql -u root -p -e "SET FOREIGN_KEY_CHECKS=0;" < /tmp/dump.sql > > Grateful for and ideas ... > > Thanks > -- For technical support contracts, goto https://order.mysql.com/?ref=ensita This email is sponsored by Ensita.NET http://www.ensita.net/ __ ___ ___ ____ __ / |/ /_ __/ __/ __ \/ / Gleb Paharenko / /|_/ / // /\ \/ /_/ / /__ [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]