XF 1.4 Database Restore Error(phpmyadmin)

akhilaniyan

Active member
Hello!

Recently I have changed my host. So, I took a full file backup and database backup.

I have successfully restored the files via file manager. But, I'm getting an SQL error while restoring the database.

Here is the error I'm getting
Code:
Error
SQL query:

<!-- PMA-SQL-ERROR -->
    <div class="error"><h1>Error</h1>
<p><strong>SQL query:</strong>
<a href="tbl_sql.php?sql_query=SHOW+TABLE+STATUS+FROM+%60sparkyh1_tidblogforum%60+LIKE+%27xf_admin_template_compiled%27&amp;show_query=1&amp;db=sparkyh1_tidblogforum&amp;table=xf_admin_template_compiled&amp;token=4e6d21119d432e5b1a94f36cef712d33"><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 `sparkyh1_tidblogforum` LIKE 'xf_admin_template_compiled'
</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&amp;token=4e6d21119d432e5b1a94f36cef712d33" 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>



MySQL said: Documentation

#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '<!-- PMA-SQL-ERROR -->
    <div class="error"><h1>Error</h1>
<p><strong>SQL quer' at line 1

While accessing the forum, I'm getting:

An unexpected database error occurred. Please try again later.

Why is this happening? Is the database tables are fully restored? Please help.

Thanks.
 
Last edited:
MySQL server has gone away

That error is caused by one of these MySQL settings being exceeded:

wait_timeout
max_allowed_packet

Your host or server person needs to increase these settings in MySQL. There is more info here:

http://dev.mysql.com/doc/refman/5.1/en/gone-away.html

This error happened during either the backup or restore. Phpmyadmin is unreliable for these operations. A direct shell command is the better method:

https://xenforo.com/community/resources/how-to-backup-and-restore-your-forum-linux-windows.359/
 
Back
Top Bottom