title: mysqldump without interrupting live production INSERT
body: <p>I'm about to migrate our production database to another server. It's about 38GB large and it's using MYISAM tables. Due to I have no physical access to the new server file system, we can only use mysqldump.</p>
  
  <p>I have looked through this site and see whether will mysqldump online backup bring down our production website. From this post: <a href="https://stackoverflow.com/questions/104612/run-mysqldump-without-locking-tables">Run MySQLDump without Locking Tables</a> , it says obviously mysqldump will lock the db and prevent insert. But after a few test, I'm curious to find out it shows otherwise. </p>
  
  <p>If I use</p>
  
  <pre><code>mysqldump -u root -ppassword --flush-logs testDB &gt; /tmp/backup.sql
  </code></pre>
  
  <p>mysqldump will eventually by default do a '<strong>--lock-tables</strong>', and this is a <strong>READ LOCAL</strong> locks (<a href="http://dev.mysql.com/doc/refman/5.1/en/mysqldump.html#option_mysqldump_lock-tables" rel="nofollow noreferrer">refer to mysql 5.1 doc</a>), where concurrent insert still available. I have done a for loop to insert into one of the table every second while mysqldump take one minute to complete. Every second there will be record inserted during that period. Which mean, mysqldump will not interrupt production server and <strong>INSERT can still go on</strong>.</p>
  
  <p>Is there anyone having different experience ? I want to make sure this before carry on to my production server, so would be glad to know if I have done anything wrong that make my test incorrect.</p>
  
  <p>[My version of mysql-server is 5.1.52, and mysqldump is 10.13]</p>