[wellylug] Weird MySQL problem.

wellylug at addict.net.nz wellylug at addict.net.nz
Sat May 14 10:13:51 NZST 2005


> Normally, to restore it I use 'mysql < BACKUPFILE.SQL'. However, for
> some strange reason when I try to do it now, I get the error message
> below:
>
> -----------------------------------------------------------------
> [root at amber sqlbackups]# mysql < sqlbackup-01-05-05.sql
> ERROR 1064 at line 19: You have an error in your SQL syntax.  Check the
> manual that corresponds to your MySQL server version for the right
> syntax to use near '-comments (
>   id int(11) NOT NULL auto_increment,
>   date dateti
> [root at amber sqlbackups]#
> -------------------------------------------------------------------

The above is due to the dash/hyphen in the table name, which MySQL doesn't
like.

That's kinda wierd in itself, by what makes it worse, is at some point
you've obviously managed to create the table with the dash/hypen in it.
Has the version of the server/client changed since then?

For the removal part, have you tried shutting down MySQL and manually
deleting the database file?

d.




More information about the wellylug mailing list