title: Execute mysqldump to back up database in sql format
body: <p>I'm trying to use PHP's <code>exec()</code> function to run <code>mysqldump</code> to back up a database named <code>projectdata</code> from <code>Amazon Web Service</code>. But I can only create an empty sql file. </p>
  
  <p>I'm running the php file with xampp, under Windows 7 where mysqldump is in C:\xampp\mysql\mysqldump</p>
  
  <pre><code>exec('C:\xampp\mysql\bin\mysqldump --user=user --password=password --host=cannotTellyou.amazonaws.com:3306 projectdata  &gt; backup.sql');
  </code></pre>