$command = 'mysqldump.exe -u '.$username.' '.$database . ' > '.$location.'\\'.$filename;
system($command);
this can create sql file correctly.
Now i'm trying to create compressed backup.
$filename = "xyz.sql.gz";
$command = 'mysqldump.exe -u '.$username.' '.$database . ' |gzip > '.$location.'\\'.$filename;
system($command);
This is creating a gz file with zero byte size.
please help, where im am doing wrong.
I didnot put -p[password] as the user i used is without password. Thanks in advance.