Fix – The selected file was generated by mysqldump and cannot be restored by this application.

Posted by admin on Jul 20, 2010 in code, SQL, tips |
MySQL Logo

MYSQL

How to fix the-selected-file-was-generated-by-mysqldump-and-cannot-be-restored-by-this-application error.

This post is here more of a reminder to myself. However I’m hoping that others will find it useful also.

I was testing out a piece of code which needed a new MYSQL InnoDB restored.

I had a slight issue ad when I attempted to restore the DB via the MySQL Administrator tool I got the following error message.

“The selected file was generated by mysqldump and cannot be restored by this application.”

This error is given usually when the Backup was taken via a batch job (or just a user who is using the command line).

Because of this the only way to restore the DB is again via the command line.

So carry out the following steps.

Firstly make sure that your .SQL backup file has the Database at the top

so it should read

Use DataBaseName;

then

find the MySQL.exe file, (this will usually be stored in the installation bin folder)

then run the following using the command line.

C:\Program Files\MySQL\MySQL Server 5.0\bin>mysql.exe -uusername -ppassword   < “C:\DB Backups\nameofbackupfile.sql”

The -uusername should be something like -uroot

and the -ppassword should be something like -psecret

Hope it helps.

Martin H


2 Comments

victor
Dec 16, 2011 at 11:05 pm

thank you, good tip, if you would have google +1 button i would press it


 
admin
Dec 17, 2011 at 2:20 pm

Thanks and I’ve now added like buttons :-)


 

Reply

Copyright © 2012 The Test Manager Blog All rights reserved. Theme by Laptop Geek.