List:General Discussion« Previous MessageNext Message »
From:Dan Nelson Date:November 30 2001 11:36pm
Subject:Re: SQL syntax error
View as plain text  
In the last episode (Nov 30), Steve Osborne said:
> I created the file with ver 3.23.43, tried to recreate database on
> 3.22.32. I administer 2 other databases the same commands and they
> work fine.  I looked at the difference in the sql files, and those
> ones don't contain the PACK_KEYS statement...just TYPE=myISAM.  The
> command used to create the sql files hasn't changed, and the
> databases are hosted by the same ISP.  It's a confusing situation.  I
> don't want to have to go back and manually change each .sql file each
> day to complete the backup process.  I wouldn't get any other work
> done.
> Any other suggestions?

* Upgrade the 2nd server to mysql 3.23 (preferable).  It's really old.

* Remove the PACK_KEYS flag from the 1st server's tables.

  mysql> ALTER TABLE mytable PACK_KEYS=0;

* Parse the mysqldump output to remove the PACK_KEYS flag before loading:

  mysqldump -h oldhost db | sed -e 's/ PACK_KEYS=1//' | mysql -h newhost db

	Dan Nelson
SQL syntax errorSteve Osborne30 Nov
  • Re: SQL syntax errorSteve Werby30 Nov
  • Re: SQL syntax errorSteve Osborne1 Dec
    • Re: SQL syntax errorDan Nelson1 Dec