On Friday 07 March 2003 00:06, Rick Mann wrote: > I have a DB where all of the tables are InnoDB, and there are a few > straightforward FOREIGN KEY constraints. I would like to use mysqldump to > back up the data or move it to another machine. > > The problem I'm running into is that when I try to import the data using > mysql, the data is imported in the order in which it was dumped, that is to > say, alphabetically by table. > > This ends up violating the key constraints. Is there a way to specify the > order in which tables are dumped from mysqldump?
No. Use SET FOREIGN_KEY_CHECKS=0 command. > I also notice that in the dump, there are what appear to be statements > disabling keys, but they're commented out. (I'm dumping from version > 3.23.51). How can I get these statements to be not commented out, and will > that help? No. > Also, in the comment, there is a !40000. What does that mean? It means that it will work only since 4.0 version. > Finally, I have INT UNSIGNED AUTO_INCREMENT primary keys in my tables, and > if I try to mysqlimport from a file that has a value of "0", instead of > writing the row like that, it picks a new value for that column. Is there > any way to get mysqlimport to import exactly as written, rather than > auto-incrementing? No, if you insert NULL or 0 into auto_increment column, column value will be incremented. -- For technical support contracts, goto https://order.mysql.com/?ref=ensita This email is sponsored by Ensita.net http://www.ensita.net/ __ ___ ___ ____ __ / |/ /_ __/ __/ __ \/ / Victoria Reznichenko / /|_/ / // /\ \/ /_/ / /__ [EMAIL PROTECTED] /_/ /_/\_, /___/\___\_\___/ MySQL AB / Ensita.net <___/ www.mysql.com --------------------------------------------------------------------- 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