mysqldump generating an empty file

Posted by chupinette on Stack Overflow See other posts from Stack Overflow or by chupinette
Published on 2010-05-03T16:16:55Z Indexed on 2010/05/03 16:18 UTC
Read the original article Hit count: 296

Filed under:
|
|

Hello all! Im trying to use mysqldump like below:

mysqldump -hlocalhost -uadmin -padmin shop> D:\b2\shop3.sql

When i execute it in command prompt, the file shop3 is generated with all the tables from the shop database. But, when I use it in my php file like below, it generates an empty file.

$cmd = 'mysqldump -hlocalhost -uadmin -padmin shop > D:\b2\shop3.sql';
        system($cmd);

Can anyone help me find my error please? Thanks

© Stack Overflow or respective owner

Related posts about mysqldump

Related posts about mysql