mysql dump

hi all
$dbhost = ‘localhost’;
$dbuser = ‘root’;
$dbpass = ‘’;
$dbname = ‘test_01’;
$conn = mysql_connect($dbhost, $dbuser, $dbpass) or die (‘Error connecting to mysql’);

$backupFile = $dbname . date(“Y-m-d-H-i-s”) . ‘.sql’;
$command = “C:\xampp\mysql\bin\mysqldump -h $dbhost -u $dbuser -p $dbpass $dbname > D:$backupFile”;


can smo help me where is the problem? i get no backup file even there`s no error.

thank u

There should not be a space after -p

i tried but it didnt work again.

Try using exec() instead of system()?

Sponsor our Newsletter | Privacy Policy | Terms of Service