Re: Need Restore Help
Jesse wrote: Strange it ran just fine here on my 5.0.22-nt with sample MyISAM table `alumni`... Is your table `alumni` MyISAM or Innodb? It is MyISAM. Here are few more pointers: 1. If it is possible *always* try latest version first when solving problems. In your case 5.0.22 I think... You were right. I updatd to 5.0.22, and the restore works just fine now. However, I've got one question. when I do a SELECT version(); now, it returns 5.0.22-community-nt. What is that? Does it make a difference? Did I download the wrong version? 3. For single line CREATE TRIGGER changing DELIMITER wasn't needed actually... but if mandatory I would personally write it like this: Unfortunately, I'm not writing it. I'm dealing with what MySQLDump gives me. Thanks for your help. I think the problem is resolved. Once the 5.0.22-community thing is resolved. Don't know if I should look into this or not. Thanks, Jesse I don't know why they renamed it again ?!? For better explanation and comparison take look here: http://www.mysql.com/network/compare.html http://www.mysql.com/products/database/ http://www.mysql.com/products -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Need Restore Help
I don't know why they renamed it again ?!? For better explanation and comparison take look here: http://www.mysql.com/network/compare.html http://www.mysql.com/products/database/ http://www.mysql.com/products Thank you. Those links were very helpful. I don't know why I can't seem to find anything on the MySQL web site. I looked around for a comparison chart like that, and just couldn't find it. I guess I'm not reading enough. Thanks, Jesse -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Need Restore Help
Jesse wrote: Are you sure this is the right line - I mean the whole statement? You are right, I did not include the whole statement. Here's the entire section: /*!50003 SET @OLD_SQL_MODE=@@SQL_MODE*/; DELIMITER ;; /*!50003 SET SESSION SQL_MODE=STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION */;; /*!50003 CREATE TRIGGER `AlumniAddDate` BEFORE INSERT ON `alumni` FOR EACH ROW SET NEW.AddDate=Now() */;; DELIMITER ; /*!50003 SET SESSION [EMAIL PROTECTED] */; SELECT VERSION(); on my server returns 5.0.15-nt. This appears to be sufficient to execute the statement. ...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?! As you can probably see from the rest of the statement that I've included above, ;; ends the current line becuase the delimiter was changed before hand. Any ideas why this won't execute? I could go through the entire backup file and remove the comments, but this would take quite a while, and I'd rather it execute properly to begin with, but not sure why it's not executing now. Thanks, Jesse Strange it ran just fine here on my 5.0.22-nt with sample MyISAM table `alumni`... Is your table `alumni` MyISAM or Innodb? Here are few more pointers: 1. If it is possible *always* try latest version first when solving problems. In your case 5.0.22 I think... 2. Yes 5.0.15-nt should run commented code just fine - I still think problem is in that multiline comment... can you try running it from console (or to edit file with text editor if its only at line 29765) and see what happens? - just try to remove backticks first. I read somewhere on the forums for problems with some spec. characters `'..etc. in comments in earlier versions. 3. For single line CREATE TRIGGER changing DELIMITER wasn't needed actually... but if mandatory I would personally write it like this: DELIMITER //; DROP TRIGGER `AlumniAddDate`// create trigger `AlumniAddDate` BEFORE INSERT on `alumni` for each row SET NEW.AddDate=Now(); // DELIMITER ;// -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Need Restore Help
Hi, This is because of the version conflict only Try usinng this option as Login into the mysql :- use databasename \. filename.txt Thanks Regards Dilipkumar - Original Message - From: Jesse [EMAIL PROTECTED] To: MySQL List mysql@lists.mysql.com Sent: Monday, July 24, 2006 8:36 PM Subject: Need Restore Help 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, -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED] ** DISCLAIMER ** Information contained and transmitted by this E-MAIL is proprietary to Sify Limited and is intended for use only by the individual or entity to which it is addressed, and may contain information that is privileged, confidential or exempt from disclosure under applicable law. If this is a forwarded message, the content of this E-MAIL may not have been sent with the authority of the Company. If you are not the intended recipient, an agent of the intended recipient or a person responsible for delivering the information to the named recipient, you are notified that any use, distribution, transmission, printing, copying or dissemination of this information in any way or in any manner is strictly prohibited. If you have received this communication in error, please delete this mail notify us immediately at [EMAIL PROTECTED] Watch the latest updates on Mumbai, with video coverage of news, events, Bollywood, live darshan from Siddhivinayak temple and more, only on www.mumbailive.in Watch the hottest videos from Bollywood, Fashion, News and more only on www.sifymax.com -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Need Restore Help
Strange it ran just fine here on my 5.0.22-nt with sample MyISAM table `alumni`... Is your table `alumni` MyISAM or Innodb? It is MyISAM. Here are few more pointers: 1. If it is possible *always* try latest version first when solving problems. In your case 5.0.22 I think... You were right. I updatd to 5.0.22, and the restore works just fine now. However, I've got one question. when I do a SELECT version(); now, it returns 5.0.22-community-nt. What is that? Does it make a difference? Did I download the wrong version? 3. For single line CREATE TRIGGER changing DELIMITER wasn't needed actually... but if mandatory I would personally write it like this: Unfortunately, I'm not writing it. I'm dealing with what MySQLDump gives me. Thanks for your help. I think the problem is resolved. Once the 5.0.22-community thing is resolved. Don't know if I should look into this or not. Thanks, Jesse -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Need Restore Help
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]
Re: Need Restore Help
Are you sure this is the right line - I mean the whole statement? You are right, I did not include the whole statement. Here's the entire section: /*!50003 SET @OLD_SQL_MODE=@@SQL_MODE*/; DELIMITER ;; /*!50003 SET SESSION SQL_MODE=STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION */;; /*!50003 CREATE TRIGGER `AlumniAddDate` BEFORE INSERT ON `alumni` FOR EACH ROW SET NEW.AddDate=Now() */;; DELIMITER ; /*!50003 SET SESSION [EMAIL PROTECTED] */; SELECT VERSION(); on my server returns 5.0.15-nt. This appears to be sufficient to execute the statement. ...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?! As you can probably see from the rest of the statement that I've included above, ;; ends the current line becuase the delimiter was changed before hand. Any ideas why this won't execute? I could go through the entire backup file and remove the comments, but this would take quite a while, and I'd rather it execute properly to begin with, but not sure why it's not executing now. Thanks, Jesse -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Need Restore Help
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, -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]