First, I would like to mention that I have done some research and found the following questions about the same error:
- MySQL error 2006: mysql server has gone away
- (2006) MySQL server has gone away
- 2006: MySQL server has gone away
- MAMP - #2006 - MySQL server has gone away
None of these questions — and the corresponding answers — actually fit my situation.
I am trying to move my WordPress site, currently hosted at OVH, from a VPS to a shared hosting solution, still with OVH.
Unfortunately, I cannot simply change my hosting plan, but need to backup my files through FTP (done) and export my database (current issue).
I am trying to export the database through PHPMyAdmin and first gave a try to the default quick
option (instead of the custom
option).
Everything seems to run smoothly, and I can download my database, as a .sql
file.
However, when I open this file, and go at the bottom to make sure my database export was complete, I find this error message:
<!-- PMA-SQL-ERROR -->
<div class="error"><h1>Error</h1>
<p><strong>SQL query:</strong>
<a href="db_sql.php?sql_query=SHOW+TABLE+STATUS+FROM+%60madalanahyfr%60+WHERE+Name+%3D+%27wp_terms%27;show_query=1;db=madalanahyfr;token=ef02e420f3f2c53c8f08de662b74062b"><span class="nowrap"><img src="themes/dot.gif" title="Edit" alt="Edit" class="icon ic_b_edit" /> Edit</span></a> </p>
<p>
<code class="sql"><pre>
SHOW TABLE STATUS FROM `madalanahyfr` WHERE Name = 'wp_terms'
</pre></code>
</p>
<p>
<strong>MySQL said: </strong><a href="./url.php?url=http%3A%2F%2Fdev.mysql.com%2Fdoc%2Frefman%2F5.5%2Fen%2Ferror-messages-server.html" target="mysql_doc"><img src="themes/dot.gif" title="Documentation" alt="Documentation" class="icon ic_b_help" /></a>
</p>
<code>
#2006 - MySQL server has gone away
</code><br />
</div>
So, it looks like my database export was not complete, and I am afraid that I will run into troubles if I try to import this database file into my new hosting.
Any idea what is going wrong here and how to make things work?
That is a corrupt export, I wouldn't trust it at all.
That error is associated with a MYSQL Server Timeout or connection interruption, Please read through this link MYSQL Docco and try adjust the wait_timeout as suggested. Perhaps you could break the export up in to individual tables.