title: Delete mysql table data (Bash Script)
body: <p>I was wondering how to delete the values in a MySQL database table from bash.</p>
  
  <p>I have a database called "database" and a table in that database called "table".</p>
  
  <p>Now I want to dump and clear the database from a bash script.</p>
  
  <p>How can I delete the values?</p>
  
  <p>I am using:</p>
  
  <pre><code>mysqldump database &gt; $DB_BACKUP/01/table-`date +%Y-%m-%d` (to dump)
  </code></pre>
  
  <p>and now trying to</p>
  
  <pre><code>DELETE FROM database.table WHERE filed &lt; CURDATE()-5
  </code></pre>