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)
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