Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can't gzip my mysqldump on the command line windows

I'm trying to make a back up of my MySQL db and zip the file.

Every time I try to run this command...

C:\wamp\bin\mysql\mysql5.5.24\bin\mysqldump.exe -u usernam -ppassword db_name | gzip > sites\www.site.com-local\backups\backup-date.sql.gz

All I get is an error saying "'gzip' is not recognized as an internal or external command, operable program or batch file'

I've used the following resources hoping they would help but have done nothing

http://www.zigpress.com/2009/04/09/enabling-gzip-on-wamp/ http://dnhome.wordpress.com/2011/10/06/apache-wampserver-enable-compression-gzip/ http://www.dewebbouwmeester.nl/enabling-gzip-on-wamp/

All say the same thing but nothing happens.

Could someone please shine some light on what i am doing wrong?

like image 829
Richard Skinner Avatar asked Jul 04 '13 13:07

Richard Skinner


People also ask

How use Mysqldump command-line?

To dump/export a MySQL database, execute the following command in the Windows command prompt: mysqldump -u username -p dbname > filename. sql . After entering that command you will be prompted for your password.

Does Mysqldump compress data?

By default MySQL Shell Dump & Load utility provides a very good compression algorithm that can save you a lot of disk space. Additionally, with it's parallelism, the Load & Dump is much faster than the traditional mysqldump.


1 Answers

I had this same problem myself with WAMP.

All you need to do is:

  1. Download gzip.exe from here: http://www.gzip.org/#exe
  2. Place gzip.exe in your PHP folder
like image 119
Laurence Avatar answered Oct 02 '22 18:10

Laurence