I am trying to restore a mysql db using a .sql.gz file. I am using mySql console to run a command because file size is too large for phpMyAdmin. Command I am using is
gunzip C:/Vik/Gya/Source/beed_2013-04-06.sql.gz | mysql -u root -p bd
ERROR 1064 (42000): You have an error in your SQL syntax; check the
manual that corresponds to your MySQL server version for the right
syntax to use nearat line 1.
C:/Vikalp/Gyankosh/Source/beedictionary_2013-04-06.sql | mysql -u root
If you type
gunzip and you get a SQL syntax error that complaints about gunzip, you are already logged into the mysql console. The mysql console is not a Unix shell!
Edit #1: I've just noticed you are using Windows. That makes me think that you haven't even installed gzip in your computer and you're just attempting to run a command you found somewhere.
My advice is that you get an archiver that can open
.gz files (7-Zip will do). Then, you can use the
source (\.) command:
mysql> \. C:/Vikalp/Gyankosh/Source/beedictionary_2013-04-06.sql
Note the prompt is
mysql> and not
Of course, you could also get a GUI client.
Edit #2: Alternatively,
gzip is also available for Windows. Just install it and run your original command.