MyBB Community Forums

Full Version: Erorr message during forum upgrade
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Trying to upgrade one of my forums and I'm getthin the error message below.

MyBB has experienced an internal SQL error and cannot continue.

SQL Error:2013 - Lost connection to MySQL server during query

Query:ALTER TABLE mybb_posts ADD INDEX (tid, dateline)


Current version is 1.6.18 I believe? Its one of those in that string of them in the drop down.

Trying to update to the latest version of 1.8
just bumping this because I've still not managed to figure this out
Maybe your forum is too big? It looks like MySQL disconnects you because query takes too long to complete.
But this is only my opinion, not sure about that.
(2018-08-30, 01:15 AM)Tempest Wrote: [ -> ]Trying to upgrade one of my forums and I'm getthin the error message below.

MyBB has experienced an internal SQL error and cannot continue.

SQL Error:2013 - Lost connection to MySQL server during query

Query:ALTER TABLE mybb_posts ADD INDEX (tid, dateline)


Current version is 1.6.18 I believe? Its one of those in that string of them in the drop down.

Trying to update to the latest version of 1.8

Have you done any incremental upgrades from 1.6.8 to 1.8.18? 

If not, try that first, then report back to us.
Hey! yes we did try to do smaller increments and got the same error
Quick bump. I use hostgator and spoke with their support about it and they said that the upgrade is trying to do too many connections at once? I'm not sure where to go from here? We did try doing smaller upgrades, like going to the next version and its still giving this error.
better hosting perhaps? too many connections is a common error with shared hosting.
I don't really want to have to move hosts just to do updates though. Is there not another solution?
I make no promises that this will work but I'm only guessing here and I have further contacted you via discord to work with you on this if you would like some help but so I do not forget I'm going to just go ahead and post this here.



The error Lost connection to MySQL server during query is a little bit of insight to what is going on considering what is the most important factor of this issue during query. It is possible that your network connection is having troubles. So lets first attempt to increase net_read_timeout from 30 seconds to 60 seconds (or if that doesn't work we could even try a longer amount of time).
}} cPanel --> phpMyAdmin --> Variables (right portion of the screen, top tab bar) --> Find net read timeout --> Edit (left hand side option) and then input 60 instead of 30 and click save (which will be next to where the edit option was).

Give it a go. If it does the same thing again, increase the time in seconds one more time to 90. Give it a go one more time. If that does the same thing again lets move on to a different attempted solution.

---

Possibility number two is that this is occurring when the client is attempting to create the connection to the server. You can attempt to change connect_timeout to a higher interval in seconds. Generally it is set to only a few so try 10 (if that doesn't work you can attempt longer).
}} cPanel --> phpMyAdmin --> Variables (right portion of the screen, top tab bar) --> Find connect timeout --> Edit (left hand side option) and then input 10 instead of whatever it is and click save (which will be next to where the edit option was).

Give it a go. If it does the same thing again, increase the time in seconds one more time to say 20. Give it a go one more time. If that does the same thing again lets move on to a different attempted solution.

---

Possibility number three could be an issue with the binary object variables are larger than what is allowed. In this instance we would give a larger interval than what is currently there a go via max_allowed_packet, now I have no idea what yours is defaulted to but mine is 268,435,456 so I would just upgrade it to 368,435,456 because that is a whole million more (if I just mathed correctly).
}} cPanel --> phpMyAdmin --> Variables (right portion of the screen, top tab bar) --> Find max allowed packet --> Edit (left hand side option) and then input your choosing of interval instead of whatever it is currently (be sure you go higher not lower) and click save (which will be next to where the edit option was).

Give it a go. If it does the same thing again, increase the time in seconds one more time. Give it a go one more time. If that does the same thing again lets move on to a different attempted solution.

---

Last solution I can think is to contact your host directly to see if they can help solve this issue for you or provide some more detail on what is going on.
Well to adress other solution I have one idea...

Backup your database and files. Restore backup on your local machine (eg. xampp, wamp, other http+php+mysql server). To make this work you can use some windows "magic" and use hosts file to make your computer thinkt that your domain is pointing to your PC (I've done that succesfully). When you restore backup your database should work as it is properly installed etc. THEN perform update on local machine, where you can have as many connections as you want. But remember that you will need to update mybb database config to your local machine for this to work (host, username, password, database name, please keep original settings to restore it on your hosting). After performing upgrade you can once again backup files and database from local machine and use them to restore your forum on hosting. If everything has been done properly after changing database config once again to original one your forum should be upgraded and work properly.

Of course you need to remember that this is one of the stupidiest ideas to upgrade forum, but it's possible.
If you make proper backups and don't try to do everything at once it SHOULD (but always there's something that can go wrong) be succesfull.