Upgrading MySQL
144
file after upgrading. Use the
--all-databases
[298]
option to include all
databases in the dump. If your databases include stored programs, use the
--
routines
[304]
and
--events
options as well.
In general, you should do the following when upgrading from MySQL 4.1 to 5.0:
• Read all the items in these sections to see whether any of them might affect your applications:
•
Section 2.19.1, “Upgrading MySQL”
, has general update information.
• The items in the change lists provided later in this section enable you to identify upgrade issues
that apply to your current MySQL installation. Some incompatibilities discussed there require your
attention before upgrading. Others should be dealt with after upgrading.
• The MySQL 5.0
Release Notes
describe significant new features you can use in 5.0 or that differ
from those found in MySQL 4.1. Some of these changes may result in incompatibilities.
Note particularly any changes that are marked Known issue or Incompatible change. These
incompatibilities with earlier versions of MySQL may require your attention before you upgrade.
Our aim is to avoid these changes, but occasionally they are necessary to correct problems that
would be worse than an incompatibility between releases. If any upgrade issue applicable to your
installation involves an incompatibility that requires special handling, follow the instructions given in
the incompatibility description. Sometimes this involves dumping and reloading tables, or use of a
statement such as
CHECK TABLE
or
REPAIR TABLE
.
For dump and reload instructions, see
Section 2.19.4, “Rebuilding or Repairing Tables or Indexes”
.
Any procedure that involves
REPAIR TABLE
with the
USE_FRM
option must be done before
upgrading. Use of this statement with a version of MySQL different from the one used to create the
table (that is, using it after upgrading) may damage the table. See
Section 13.7.2.6, “
REPAIR TABLE
Syntax”
.
• Before upgrading to a new version of MySQL,
Section 2.19.3, “Checking Whether Tables or Indexes
Must Be Rebuilt”
, to see whether changes to table formats or to character sets or collations were
made between your current version of MySQL and the version to which you are upgrading. If so and
these changes result in an incompatibility between MySQL versions, you will need to upgrade the
affected tables using the instructions in
Section 2.19.4, “Rebuilding or Repairing Tables or Indexes”
.
• After upgrading to a new version of MySQL, run
mysql_upgrade
(see
Section 4.4.9,
“
mysql_upgrade
— Check Tables for MySQL Upgrade”
). This program checks your tables, and
attempts to repair them if necessary. It also updates your grant tables to make sure that they have
the current structure so that you can take advantage of any new capabilities. (Some releases of
MySQL introduce changes to the structure of the grant tables to add new privileges or features.)
mysql_upgrade
does not upgrade the contents of the help tables. For upgrade instructions, see
Section 5.1.8, “Server-Side Help”
.
• If you run MySQL Server on Windows, see
Section 2.10.6, “Upgrading MySQL on Windows”
.
• MySQL 5.0 adds support for stored procedures. This support requires the
mysql.proc
table.
To create this table, you should run the
mysql_upgrade
program as described in
Section 4.4.9,
“
mysql_upgrade
— Check Tables for MySQL Upgrade”
.
• MySQL 5.0 adds support for views. This support requires extra privilege columns in the
mysql.user
and
mysql.db
tables. To create these columns, you should run the
mysql_upgrade
program as described in
Section 4.4.9, “
mysql_upgrade
— Check Tables for MySQL Upgrade”
.
• If you use replication, see
Section 16.4.3, “Upgrading a Replication Setup”
, for information on
upgrading your replication setup.
If your MySQL installation contains a large amount of data that might take a long time to convert after
an in-place upgrade, you might find it useful to create a “dummy” database instance for assessing what
Summary of Contents for 5.0
Page 1: ...MySQL 5 0 Reference Manual ...
Page 18: ...xviii ...
Page 60: ...40 ...
Page 396: ...376 ...
Page 578: ...558 ...
Page 636: ...616 ...
Page 844: ...824 ...
Page 1234: ...1214 ...
Page 1427: ...MySQL Proxy Scripting 1407 ...
Page 1734: ...1714 ...
Page 1752: ...1732 ...
Page 1783: ...Configuring Connector ODBC 1763 ...
Page 1793: ...Connector ODBC Examples 1773 ...
Page 1839: ...Connector Net Installation 1819 2 You must choose the type of installation to perform ...
Page 2850: ...2830 ...
Page 2854: ...2834 ...
Page 2928: ...2908 ...
Page 3000: ...2980 ...
Page 3122: ...3102 ...
Page 3126: ...3106 ...
Page 3174: ...3154 ...
Page 3232: ...3212 ...