Unable to gzip my mysqldump in command line windows

I am trying to backup my MySQL db and archive 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: "gzip" is not recognized as an internal or external command, operating program or batch file

I used the following resources, hoping they would help, but did 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/

Everyone says the same thing, but nothing happens.

Can someone please track what I'm doing wrong?

+4
source share
4 answers

I had the same problem with WAMP.

All you have to do is:

+12
source

This tells you that gzip cannot find your system anywhere. You can blame, but you installed gzip.

Check the value of the $ PATH (or system) variable. Then install a copy of gzip in one of these directories.

0
source

Yes, you have to put zip.exe in your folder with you, for example wamp/bin/mysql/[your mysql version]/bin .

0
source

Find or install gzip locally. After that, directly in the PHP folder, create only the gzip.bat file, specify the full path to the existing gzip binary file and save it. For example: C:\git\bin\gzip.exe

No need to place gzip.exe in your PHP folder.

0
source

Source: https://habr.com/ru/post/1489722/


All Articles