Oracle 5.0 Reference Manual page 175

Table of Contents

Advertisement

1. Stop the server for the existing version if it is running.
2. Install a different version of MySQL. This is an upgrade if the new version is higher than the original
version, a downgrade if the version is lower.
3. Start the server for the new version.
In many cases, the tables from the previous version of MySQL can be used without problem by the
new version. However, sometimes changes occur that require tables or table indexes to be rebuilt,
as described in this section. If you have tables that are affected by any of the issues described here,
rebuild the tables or indexes as necessary using the instructions given in
Repairing Tables or
Table Incompatibilities
After a binary upgrade to MySQL 5.1 from a MySQL 5.0 installation that contains
accessing those tables causes the server to crash, even if you have run
TABLE ... FOR
tables before upgrading, and reload them into MySQL 5.1 after upgrading. The same problem occurs
for binary downgrades from MySQL 5.1 to 5.0.
Index Incompatibilities
If you perform a binary upgrade without dumping and reloading tables, you cannot upgrade directly
from MySQL 4.1 to 5.1 or higher. This occurs due to an incompatible change in the
format in MySQL 5.0. Upgrade from MySQL 4.1 to 5.0 and repair all
from MySQL 5.0 to 5.1 and check and repair your tables.
Modifications to the handling of character sets or collations might change the character sort order,
which causes the ordering of entries in any index that uses an affected character set or collation to be
incorrect. Such changes result in several possible problems:
• Comparison results that differ from previous results
• Inability to find some index values due to misordered index entries
• Misordered
• Tables that
The solution to these problems is to rebuild any indexes that use an affected character set or collation,
either by dropping and re-creating the indexes, or by dumping and reloading the entire table. In
some cases, it is possible to alter affected columns to use a different collation. For information about
rebuilding indexes, see
To check whether a table has indexes that must be rebuilt, consult the following list. It indicates which
versions of MySQL introduced character set or collation changes that require indexes to be rebuilt.
Each entry indicates the version in which the change occurred and the character sets or collations that
the change affects. If the change is associated with a particular bug report, the bug number is given.
The list applies both for binary upgrades and downgrades. For example, Bug #27877 was fixed in
MySQL 5.1.24 and 5.4.0, so it applies to upgrades from versions older than 5.1.24 to 5.1.24 or newer,
and to downgrades from 5.1.24 or newer to versions older than 5.1.24.
In many cases, you can use
rebuilding is required. It will report this message:
Table upgrade required.
Please do "REPAIR TABLE `tbl_name`" to fix it!
In these cases, you can also use
execute
CHECK
Checking Whether Tables or Indexes Must Be Rebuilt
Indexes".
UPGRADE. To work around this problem, use
results
ORDER BY
reports as being in need of repair
CHECK TABLE
Section 2.19.4, "Rebuilding or Repairing Tables or
CHECK TABLE ... FOR UPGRADE
mysqlcheck --check-upgrade
TABLE. However, the use of
mysqldump
to identify tables for which index
applies only after upgrades, not
CHECK TABLE
155
Section 2.19.4, "Rebuilding or
tables,
ARCHIVE
or
mysql_upgrade
to dump all
ARCHIVE
MyISAM
tables. Then upgrade
MyISAM
Indexes".
or mysql_upgrade, which
CHECK
table index

Advertisement

Table of Contents
loading

This manual is also suitable for:

Mysql 5.0

Table of Contents