My Website Went Down When MySQL Upgraded from 4.0 to 5.5
If your website was impacted by upgrading MySQL 4.0 to MySQL 5.5, we have some information to help you bring your site back online.
You can fix most issues by simply rebuilding your database's tables. You must complete these steps for each table in your database.
Rebuilding databases includes exporting your database, dropping the tables, and then importing the SQL file you exported.
To Export Your Database
- Log in to phpMyAdmin. For more information, see Log in to phpMyAdmin.
- On the left, click the database you want to use.
- In the Export section, click Select All, and then make sure SQL is selected.
- At the bottom, select Save File As.
- Click Go.<./li>
This process saves a
SQL file to your local machine.
To Drop the Database's Tables
- Go to the SQL tab.
- Enter the following:
DROP TABLE [table_name];where
[table_name]is the name of each of your tables. You can view all of the tables in your database by clicking its name on the left.
For example, what you enter might look something like this:DROP TABLE wp_commentmeta;
DROP TABLE wp_comments;
DROP TABLE wp_links;Warning: Only run the DROP TABLE command for database tables you exported. We recommend exporting, dropping, and importing all of your tables.
- Click Go.
To Import Your Exported Database
- Go to the Import tab.
- Click Choose File.
- Select the
SQLfile generated in the To Export Your Database section.
- Click Go.
Go check out your site. If it's back online, that's wonderful. You should go upgrade your applications to the latest versions, and then you're done.
If your site is still not live, we have additional information you can use below. However, this information requires an advanced understanding of MySQL. If rebuilding your database didn't resolve the issue and you don't understand the information below, please contact our Support department for assistance.
You can see MySQL's documented upgrade issues here:
- Upgrading from 4.0 to 4.1
- Upgrading from 4.1 to 5.0
- Upgrading from 5.0 to 5.1
- Upgrading from 5.1 to 5.5
If you have created or used InnoDB tables with TIMESTAMP columns in MySQL versions 4.1.0 to 4.1.3, you must rebuild those tables when you upgrade to MySQL 4.1.4 or later. The storage format in those MySQL versions for TIMESTAMP columns was incorrect. If you upgrade from MySQL 4.0 to 4.1.4 or later, no rebuild of tables with TIMESTAMP columns is needed.
If you have an InnoDB table created with MySQL 4.1.2 or earlier, with an index on a non-latin1_swedish_ci character set and collation order column that is not BINARY (in the case of 4.1.0 and 4.1.1, with any character set and collation), and that column may contain characters with a code < ASCII(32), you should do ALTER TABLE or OPTIMIZE TABLE on it to regenerate the index, after upgrading to MySQL 4.1.3 or later. MyISAM tables also have to be rebuilt or repaired in these cases. You can use mysqldump to dump them in 4.0 and then reload them in 4.1. An alternative is to use OPTIMIZE TABLE after upgrading, but this must be done before any updates are made in 4.1.
If you have any tables where you have indexes on CHAR, VARCHAR or TEXT column in which the last character in index values may be less than ASCII(32), you should rebuild those indexes to ensure that the table is correct.
If you have used column prefix indexes on UTF-8 columns or other multi-byte character set columns in MySQL 4.1.0 to 4.1.5, you must rebuild the tables when you upgrade to MySQL 4.1.6 or later.
If you have used accent characters (characters with byte values of 128 to 255) in database names, table names, constraint names, or column names in versions of MySQL earlier than 4.1, you cannot upgrade to MySQL 4.1 directly, because 4.1 uses UTF-8 to store metadata. Use RENAME TABLE to overcome this if the accent character is in the table name or the database name, or rebuild the table.