Navigate / search

Database Error [MySQL Server has gone away] after WordPress Upgrade

Database Error [MySQL Server has gone away] after WordPress Version 3.4 Upgrade (Solution)

If you recently upgraded your WordPress Blog from any older version to a newer one, post WordPress upgrade, you land on a page that requests you to perform a database upgrade; there are chances that you could encounter the Database Error [MySQL server has gone away]. Do not panic and try to roll back or make any changes, a small fix as recommended below will surely fix the issue.

This method can be used to fix ANY version upgrade database error and not specifically the 3.4 version. Below is the screenshot of the error that will show you how the database upgrade screen will look like.

Step 1: Log on to your web hosting control panel and open “PHPmyAdmin”, select the database in use and find the table WP_Options

Step 2: Brows the list of table items below to find db_version and check the respective Option_value and take a note of the value (let’s call it value A)

Database Error [MySQL Server has gone away] after WordPress Version 3.4 Upgrade (Solution)

Step 3: Go to your hosting FTP / file manager and edit the file called version.php (under wp-Includes). Scroll down to find the line $wp_db_version = 20596; (this is specific to this version, in other versions, look for the corresponding db value and note it – lets call its as Value B)

Step 4: Ensure value A and B are equal. If not, replace the value A with the Value B that you identified. That means, make the change in PHPmyAdmin by editing the value of db_version with the one you identified from the version.php file.

Step 5: you are done! Save and reload the WP admin dashboard and you are all set, the confirmation would be the below image.

Let me know if you have any questions on the simple fix for Database Error [MySQL Server has gone away] after WordPress Version 3.4 Upgrade

Database Error [MySQL Server has gone away] after WordPress Version 3.4 Upgrade (Solution)

Joshu Thomas

Founder of OrangeCopper Webmaster Networks, also writes for the latest Launch - HippieMonk Tech & LifeStyle Blog! Stay tuned to the Orangecopper Network of websites at our network page. Me on Google+

13 comments
Sort: Newest | Oldest
Nirav Patel
Nirav Patel

I followed your all steps and i found value A and B are same in my case but still its not working with ajax call to admin-ajax.php .. Giving me same error : MySQL server has gone away

john smith
john smith

thanks for providing good information about mysql it is solve the problem very quickly

Cataract Eye Operati
Cataract Eye Operati

Thank you for this informative blog that how to fix the database error on updated version of word press.

Jefry
Jefry

after I do the switching hosting, database wordpress blog I also experienced an error thanks for this share

omkar
omkar

thanks a ton dude! you saved my day

SQL guru
SQL guru

Joshu, Any idea if this could be related to any of the WP plugins? Will disabling the plugin folder via FTP help in any way? And is this only specific to the 3.4 version or the fix works for older versions as well?

Serene
Serene

Thanks buddy! Don't think even the open source community developers were as quick as you to release the bug fix! Thanks a lot. You are a genius :) good luck and nice blog here

Mark Miller
Mark Miller

Thanks a lot for the solution so quick.. It helped a lot to get my blog back up, I was worried if it was a PHP memory issue, your solution worked like a charm, thanks again.

Manikandan
Manikandan

Man!!!! I was scared to death when I saw my CMS went down ying the DB failed to upgrade and the wp admin is redirecting to the MySQL error and I was clueless, your post was on time and on top of google search - I owe you, made my day!! Thanks for the life saver.. Mani

merfo
merfo

I thought you had stopped writing the blog

Joshu Thomas
Joshu Thomas

:) nope buddy! wont ever give up blogging. Personal life having some glitches.. was busy fixing them. hope to keep writing ..

merfo
merfo

You write very well. I do not understand everything in English, almost do not know him. But I read your blog with pleasure.