title: Mysqldump return empty file .sql
body: <p>I'm try to do a dump of my db in this way:</p>
  
  <p><code>$output = NULL;
  $command = 'mysqldump -u $dbuser -h localhost -p$password $dbname &gt; dump.sql';
  passthru($command, $output);</code></p>
  
  <p>I've tried in this way too:</p>
  
  <pre><code>$command = 'mysqldump -u $dbuser -h localhost -p$password $dbname &gt; dump.sql';
  exec($command);
  </code></pre>
  
  <p>In both ways it create an empty dump.sql</p>
  
  <p>Where am I wrong? Can you help me?</p>