2019-01-30, 08:12 PM
When attempting to backup the database so I can move to another server it finished way too quickly with way to small a gz so I tried again with clear text so I could see the error:
How can I go about further troubleshooting and hopefully fixing this without losing the trove of data we keep in the custom user fields?
Thanks,
gmO
I would like to add that my path to myBB 1.8 came from a very crazy upgrade path quite a few years ago in case that makes a difference. We came from an ASP/Access based forum called Snitz that was from a circa 2001 version. I had to run some scripts to convert to phpBB2 then upgrade to phpBB3 and then import into myBB 1.6.x We finally upgraded to myBB 1.8 about 13 months ago.
I just opened up the backup_userfields-2 table and sorted from by ufid which looks like it is the crosslink to user ID and what I see are the oldest of our members from back near 2000. Many of them are now long gone and have never been back to update their user profiles and therefore most of the fields are blank or contain NULL. Since it seems to be barfing on the very first line I can tell you that it contains nothing but blanks and NULLs.
Any insight to what the optimize or backup scripts do exactly? Since it seems to be bulking right at the start of the backup_userfields-2 table I could try to troubleshoot on a copy of the database to see if there's some sort of symbol or character or other junk it seems like it would be in the very first row in that table. I just don't know what determine's the "first" row. Is there an index or would it be that ufid column?
Also, I'm assuming that I can't just delete the "first" row without causing problems that would cascade elsewhere since the table is likely linked to other processes.
Even shots in the dark will be helpful to me as I have a copy of the db I can tinker with...
<style type="text/css">
#mybb_error_content { border: 1px solid #026CB1; background: #fff; -moz-border-radius: 3px; -webkit-border-radius: 3px; border-radius: 3px; }
#mybb_error_content a:link { color: #026CB1; text-decoration: none; }
#mybb_error_content a:visited { color: #026CB1; text-decoration: none; }
#mybb_error_content a:hover, a:active { color: #000; text-decoration: underline; }
#mybb_error_content h2 { font-size: 12px; padding: 4px; background: #026CB1; color: #fff; margin: 0; border-bottom: none; }
#mybb_error_error { padding: 6px; }
#mybb_error_footer { font-size: 12px; border-top: 1px dotted #DDDDDD; 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>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 '-2' at line 1</dd>
<dt>Query:</dt>
<dd>OPTIMIZE TABLE backup_userfields-2</dd>
</dl>
<p id="mybb_error_footer">Please contact the <a href="https://mybb.com">MyBB Group</a> for technical support.</p>
</div>
</div>
That comes at the end of the backup_userfields portion of the SQL Insert statements. So as a follow-up I go to the optimize database and select all tables except for the userfields-2 and it works fine. When I select all or only the uf-2 I get:Quote:MyBB has experienced an internal SQL error and cannot continue.
SQL Error: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 '-2' at line
1Query:OPTIMIZE TABLE backup_userfields-2
Please contact the MyBB Group for technical support.
How can I go about further troubleshooting and hopefully fixing this without losing the trove of data we keep in the custom user fields?
Thanks,
gmO
I would like to add that my path to myBB 1.8 came from a very crazy upgrade path quite a few years ago in case that makes a difference. We came from an ASP/Access based forum called Snitz that was from a circa 2001 version. I had to run some scripts to convert to phpBB2 then upgrade to phpBB3 and then import into myBB 1.6.x We finally upgraded to myBB 1.8 about 13 months ago.
I just opened up the backup_userfields-2 table and sorted from by ufid which looks like it is the crosslink to user ID and what I see are the oldest of our members from back near 2000. Many of them are now long gone and have never been back to update their user profiles and therefore most of the fields are blank or contain NULL. Since it seems to be barfing on the very first line I can tell you that it contains nothing but blanks and NULLs.
Any insight to what the optimize or backup scripts do exactly? Since it seems to be bulking right at the start of the backup_userfields-2 table I could try to troubleshoot on a copy of the database to see if there's some sort of symbol or character or other junk it seems like it would be in the very first row in that table. I just don't know what determine's the "first" row. Is there an index or would it be that ufid column?
Also, I'm assuming that I can't just delete the "first" row without causing problems that would cascade elsewhere since the table is likely linked to other processes.
Even shots in the dark will be helpful to me as I have a copy of the db I can tinker with...