MyBB Community Forums

Full Version: SQL Error while trying to import myBB database
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello, I'm getting the following SQL error while trying to import my myBB database. The database is about 5 MB, so it's nothing huge, yet I'm still getting the error. Any help would be highly appreciated as I've been working on this forum for quite some time.

There seems to be an error in your SQL query. The MySQL server error output below, if there is any, may also help you in diagnosing the problem

ERROR: Unknown Punctuation String @ 379
STR: </
SQL: 
	<style type="text/css">
		#mybb_error_content { border: 1px solid #B60101; background: #fff; }
		#mybb_error_content h2 { font-size: 12px; padding: 4px; background: #B60101; color: #fff; margin: 0; }
		#mybb_error_error { padding: 6px; }
		#mybb_error_footer { font-size: 11px; border-top: 1px solid #ccc; padding-top: 10px; }
		#mybb_error_content dt { font-weight: bold; }
	</style>
	<div id="mybb_error_content">
		<h2>MyBB SQL Error</h2>
		<div id="mybb_error_error">
		<p>MyBB has experienced an internal SQL error and cannot continue.</p><dl>
<dt>SQL Error:</dt>
<dd>2006 - MySQL server has gone away</dd>
<dt>Query:</dt>
<dd>OPTIMIZE TABLE mybb_privatemessages</dd>
</dl>

			<p id="mybb_error_footer">Please contact the <a href="http://mybb.com">MyBB Group</a> for support.</p>
		</div>
	</div>


SQL query:

<style type="text/css"> #mybb_error_content { border: 1px solid #B60101; background: #fff; } #mybb_error_content h2 { font-size: 12px; padding: 4px; background: #B60101; color: #fff; margin: 0; } #mybb_error_error { padding: 6px; } #mybb_error_footer { font-size: 11px; border-top: 1px solid #ccc; padding-top: 10px; } #mybb_error_content dt { font-weight: bold; } </style> <div id="mybb_error_content"> <h2>MyBB SQL Error</h2> <div id="mybb_error_error"> <p>MyBB has experienced an internal SQL error and cannot continue.</p><dl> <dt>SQL Error:</dt> <dd>2006 - MySQL server has gone away</dd> <dt>Query:</dt> <dd>OPTIMIZE TABLE mybb_privatemessages</dd> </dl> <p id="mybb_error_footer">Please contact the <a href="http://mybb.com">MyBB Group</a> for support.</p> </div> </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 '&lt;style type=&quot;text/css&quot;&gt;
        #mybb_error_content { border: 1px solid #B60101; backg' at line 1 
Is your existing database full or empty? If it's empty just delete the old database and then upload the new one. And you may need to edit your config.php if they have different database prefixes.
Your backup wasn't complete when you took it, it lost connection to the MySQL server while it was being made, do you still have access to that database??
(2011-05-07, 05:16 PM)Spazmatic Wrote: [ -> ]Is your existing database full or empty? If it's empty just delete the old database and then upload the new one. And you may need to edit your config.php if they have different database prefixes.

I really didn't understand, let me elaborate; I made a back-up of my forum from the acp, then I tried to import it on phpmyadmin to a completely new SQL Database, during the import I got that error.


(2011-05-08, 11:40 AM)MattRogowski Wrote: [ -> ]Your backup wasn't complete when you took it, it lost connection to the MySQL server while it was being made, do you still have access to that database??

Yes, I'm actually planning to shift host, so that's why I was just doing a test run, let me try to make a new backup and see if I can import it again, even though this problem isn't new to me, I've gotten similar errors before;

http://community.mybb.com/thread-27771-page-9.html (Post 82)
Try only backing up 15-20 tables a time. Big tables (threads, posts, users, maybe privatemessages) might time out; if you take the backup in stages, it might work better, then you can just import all the backup files yo take and it'll import as normal, just in chunks.
Well their still seems to be a problem with that specific table, however by backing up in parts, I was able to gain most of the tables, (2-3 still seem to be missing)

However, I plan on shifting this forum to vB, so I think I got more than enough tables for Impex.

Thanks for all the quick responses MattSmile
Why is MyBB not an option?? vBulletin is crap.
(2011-05-13, 12:24 PM)Shukaku Wrote: [ -> ]Why is MyBB not an option?? vBulletin is crap.

MyBB is no doubt a very fine forum software, the only reason for me doing this is I need to give my forum more of a social community look. So that's why I shifted to vB for that specific forum, I'll still be using MyBB for the rest.

MyBB is always the option;P