Upgrading a Replication Setup
1509
a master running MySQL 4.1 or earlier to a slave running MySQL 5.1 or later. To work around such
problems, you can insert a MySQL server running an intermediate version between the two; for
example, rather than replicating directly from a MySQL 4.1 master to a MySQL 5.1 slave, it is possible
to replicate from a MySQL 4.1 server to a MySQL 5.0 server, and then from the MySQL 5.0 server to a
MySQL 5.1 server.
Important
It is strongly recommended to use the most recent release available within a
given MySQL major version because replication (and other) capabilities are
continually being improved. It is also recommended to upgrade masters and
slaves that use early releases of a major version of MySQL to GA (production)
releases when the latter become available for that major version.
Replication from newer masters to older slaves may be possible, but is generally not supported. This is
due to a number of factors:
• Binary log format changes.
The binary log format can change between major releases. While
we attempt to maintain backward-compatiblity, this is not always possible. Major changes were made
in MySQL 5.0.3 (for improvements to handling of character sets and
LOAD DATA INFILE
) and
5.0.4 (for improvements to handling of time zones). Because of these changes, replication from a
MySQL 5.0.3 or later master to a MySQL 5.0.2 or earlier slave is not supported. This also means that
replication from a MySQL 5.0.3 (or later) master to any MySQL 4.1 (or earlier) slave is generally not
supported.
This also has significant implications for upgrading replication servers; see
Section 16.4.3,
“Upgrading a Replication Setup”
, for more information.
• Use of row-based replication.
Row-based replication was implemented in MySQL 5.1.5, so you
cannot replicate using row-based replication from any MySQL 5.0 or later master to a slave older
than MySQL 5.1.5.
Note
Row-based replication is not available in MySQL 5.0. For more information
about row-based replication in MySQL 5.1, see
Replication Formats
.
• SQL incompatibilities.
You cannot replicate from a newer master to an older slave using
statement-based replication if the statements to be replicated use SQL features available on the
master but not on the slave.
For more information on potential replication issues, see
Section 16.4.1, “Replication Features and
Issues”
.
16.4.3. Upgrading a Replication Setup
When you upgrade servers that participate in a replication setup, the procedure for upgrading depends
on the current server versions and the version to which you are upgrading.
This section applies to upgrading replication from older versions of MySQL to MySQL 5.0. A 4.0 server
should be 4.0.3 or newer.
When you upgrade a master to 5.0 from an earlier MySQL release series, you should first ensure that
all the slaves of this master are using the same 5.0.x release. If this is not the case, you should first
upgrade the slaves. To upgrade each slave, shut it down, upgrade it to the appropriate 5.0.x version,
restart it, and restart replication. The 5.0 slave is able to read the old relay logs written prior to the
upgrade and to execute the statements they contain. Relay logs created by the slave after the upgrade
are in 5.0 format.
After the slaves have been upgraded, shut down the master, upgrade it to the same 5.0.x release as
the slaves, and restart it. The 5.0 master is able to read the old binary logs written prior to the upgrade
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 ...