Re: Mysql restore from sql file syntax error
Posted by: Zachary Wemlinger
Date: April 10, 2007 12:52PM

Shahriar,

Yep, I ran into the same problem and it is quite maddening! My situation came from backing up my development database on my Windows XP machine and trying to restore it on a Linux box. However, I was also getting this error when I tried to test restore the backup on my Windows box. Here is the solution that worked for me:

Backup the DB as usual, using mysqldump
When restoring the backup, instead of going the $: mysql –u user –p database < path/to/backup_file.sql route, login to MySQL and from the mysql prompt try:
mysql > use database;
mysql > source path/to/backup_file.sql;

That worked fine for me. I cannot say exactly why, but it may help you out.

Good luck!

Options: ReplyQuote


Subject
Written By
Posted
Re: Mysql restore from sql file syntax error
April 10, 2007 12:52PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.