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
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.