title: MySQL Error 2006 (HY000) at line 406: MySQL server has gone away - even after increasing dump file size setting
body: <p>I'm trying to move a database from serverA to serverB. I've created a mysql dump using the following command: </p>
  
  <pre><code>mysqldump -u root -p -c --add-drop-table --add-locks --quick --lock-tables mydatabase &gt; /var/log/mydatabaseJan31.sql
  </code></pre>
  
  <p>Then on serverB, I'm trying to import this data by doing the following: </p>
  
  <pre><code>mysql -u root -p mydatabase &lt; /tmp/mydatabaseJan31.sql
  </code></pre>
  
  <p>I'm getting the error "ERROR 2006 (HY000) at line 408: MySQL server has gone away" almost immediately.
  I've read other posts on stackoverflow about the same error message and I have tried the following: </p>
  
  <ol>
  <li><p>modified my.cnf to include: </p>
  
  <p>[mysqldump]<br>
  quick<br>
  max_allowed_packet = 64M </p></li>
  </ol>
  
  <p>Then i restarted mysql. By the way, the file size is actually only 5.2mb</p>
  
  <ol>
  <li>tried creating the dump file using phpmyadmin. </li>
  <li>I don't think it's a timeout issue because it dies 2 seconds into the import process.</li>
  <li><p>I've opened the mysql dump file and checked out the line number it's bombing on, and it's a part of a massive insert statement that starts on line 43.
  I'm not sure if it's relevant, but line 406 starts off with an incomplete string: </p>
  
  <p>line 402---->  (341,1996,12,'</p>
  
  <p>line 403---->front'),(341,1996,12,'interior'),(341,1996,12,'rear'),(341,1996,13,'front'),(341,1996,13,'interior'),(341,1996,13,'rear'),(341,1996,14,'front')</p></li>
  </ol>
  
  <p>but having said that, all the preceding records that are being inserted look the same way... so I don't think that's the problem either. </p>
  
  <p>Any suggestions would be appreciated. </p>