MysqlDump Return a Empty database backup file
<p>I use this code for download a backup of MySql database but it download a empty file.
Please also guide for restore this backup.</p>

<pre><code>&lt;?php
//connect to database
include'connect.php';
$backupFile = $dbname . date("Y-m-d-H-i-s") . '.sql';
$command = "mysqldump -h$hostname -u$username -p$password $dbname &gt; $backupFile";
system($command);
?&gt;
</code></pre>
