I am extremely new to MySQL and am running it on Windows. I am trying to restore a Database from a dumpfile in MySQL, but I get the following error:
$ >m
The file you are trying to import is a zip file. Unzip the file and then try to import again.
I had this error once, after running mysqldump
on Windows PowerShell like so:
mysqldump -u root p my_db --no-data --no-create-db --no-create-info --routines --triggers --skip-opt --set-gtid-purged=OFF > db_objects.sql
What I did was change it to this (pipe instead to Set-Content):
mysqldump -u root p my_db --no-data --no-create-db --no-create-info --routines --triggers --skip-opt --set-gtid-purged=OFF | Set-Content db_objects.sql
And the problem went away!
Extract your file with Tar archiving tool. you can use it in this way:
tar xf example.sql.gz
If you don't have enough space or don't want to waste time in decompressing it, Try this command.
gunzip < compressed-sqlfile.gz | mysql -u root -p
Don't forget to replace compressed-sqlfile.gz with your compressed file name.
.gz restore will not work without command I provided above.
Its must you file dump.sql problem.Use Sequel Pro check your file ecoding.It should be garbage characters in your dump.sql.