Jesse wrote:
I have a backup that was created by a MySQL 5 server using MySQLDump. When I try to restore the database using the following command:

mysql -u root -p -D BPA < c:\backup\mydata.sql

I get the error:
ERROR 1064 (42000) at line 29765: 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 '/' at line 1

Here is what line 29765 says in the backup file:

/*!50003 CREATE TRIGGER `AlumniAddDate` BEFORE INSERT ON `alumni` FOR EACH ROW SET NEW.AddDate=Now() */;;

This is obviously one of the triggers that I've created. I don't know why it's commented them out in the backup, but I don't seem to be able to overcome this. I'd rather it ignore these lines anyway. How do I get passed this?

Thanks,

Are you sure this is the right line - I mean the whole statement?

Also please read (with comments):
http://dev.mysql.com/doc/refman/5.0/en/comments.html

If you add a version number after the ‘!’ character, the syntax within the comment is executed only if the MySQL version is greater than or equal to the specified version number. The TEMPORARY keyword in the following comment is executed only by servers from MySQL 3.23.02 or higher:

CREATE /*!32302 TEMPORARY */ TABLE t (a INT);

...perhaps as some comments suggest try to remove single apostrophes /which sometimes puzzle parser/ and see if it works. What puzzles me personally is double ;; at the end?!

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to