I've got a large test database and a recent backup made with mysqldump. I've been deleting records from it and would like to get back where I started. The easiest way is to drop database, create database, and then input from the mysqldump backup file. To automate it and make it quick I do it like this:
mysqladmin -u rradmin --password=xxxxxx drop rrtest2 mysqladmin -u rradmin --password=xxxxxx create rrtest2 mysql -u rradmin --password=xxxxxx --database=rrtest2 < DATA.sql Reloading the DB from DATA.sql gives me this error message: ERROR 1064 at line 679: You have an error in your SQL syntax near 'field(field), KEY type(type), KEY tsrc(tsrc) ) TYPE=MyISAM' at line 10 The whole table definition in question looks like this: CREATE TABLE fnames ( field varchar(40) NOT NULL default '', type varchar(10) NOT NULL default '', fieldorder int(4) default '0', longdesc varchar(200) default NULL, required int(1) default '0', tsrc varchar(40) NOT NULL default '', visible int(1) default '0', misc blob, KEY field(field), # <= here's the problem KEY type(type), KEY tsrc(tsrc) ) TYPE=MyISAM; It's the first KEY definition it doesn't like. If I comment out "KEY field(field)," it works, except of course then the field called 'field' is not set as an index. The same exact problem occurs in two places in the mysqldump file. With them commented out the DB reloads. Perhaps some later version of mysql since this database was originally created came declares that one shouldn't have a field called 'field', or in which a field called 'field' shouldn't be an index (key)? Just a theory. Surely someone on this esteemed list of experts knows. -- Lynn David Newton Phoenix, AZ --------------------------------------------------------------------- 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