title: How to delete millions of record from mysql table
body: <p>In my MySQL table contain more than 20 millions of records . I want to delete it from lower index by running </p>
  
  <pre><code>delete FROM mydb.dailyreportdetails where idDailyReportDetails&gt;0 order by idDailyReportDetails asc limit 1000 ;
  </code></pre>
  
  <p>While running the above query i got the error as mention below</p>
  
  <pre><code>Operation failed: There was an error while applying the SQL script to the database.
  ERROR 1205: 1205: Lock wait timeout exceeded; try restarting transaction
  SQL Statement:
  </code></pre>
  
  <p><strong>Is there have any way to run query in mysql background or any faster steps to delete those record ?</strong></p>