Upgrading MySQL
143
• MySQL 5.0.27 is the last version in MySQL 5.0 for which MySQL-Max binary distributions are
provided, except for RPM distributions. For RPMs, MySQL 5.0.37 is the last release. After these
versions, the features previously included in the
mysqld-max
server are included in
mysqld
.
If you previously installed a MySQL-Max distribution that includes a server named
mysqld-max
,
and then upgrade later to a non-Max version of MySQL,
mysqld_safe
still attempts to run the old
mysqld-max
server. If you perform such an upgrade, you should remove the old
mysqld-max
server manually to ensure that
mysqld_safe
runs the new
mysqld
server.
For upgrades between versions of a MySQL release series that has reached General Availability
status, you can move the MySQL format files and data files between different versions on systems with
the same architecture. For upgrades to a version of a MySQL release series that is in development
status, that is not necessarily true. Use of development releases is at your own risk.
If you are cautious about using new versions, you can always rename your old
mysqld
before
installing a newer one. For example, if you are using a version of MySQL 4.1 and want to upgrade
to 5.0, rename your current server from
mysqld
to
mysqld-4.1
. If your new
mysqld
then does
something unexpected, you can simply shut it down and restart with your old
mysqld
.
If problems occur, such as that the new
mysqld
server does not start or that you cannot connect
without a password, verify that you do not have an old
my.cnf
file from your previous installation.
You can check this with the
--print-defaults
[240]
option (for example,
mysqld --print-
defaults
). If this command displays anything other than the program name, you have an active
my.cnf
file that affects server or client operation.
If, after an upgrade, you experience problems with compiled client programs, such as
Commands
out of sync
or unexpected core dumps, you probably have used old header or library files
when compiling your programs. In this case, you should check the date for your
mysql.h
file and
libmysqlclient.a
library to verify that they are from the new MySQL distribution. If not, recompile
your programs with the new headers and libraries. Recompilation might also be necessary for
programs compiled against the shared client library if the library major version number has changed
(for example from
libmysqlclient.so.15
to
libmysqlclient.so.16
.
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
conversions might be needed and the work involved to perform them. Make a copy of your MySQL
instance that contains a full copy of the
mysql
database, plus all other databases without data. Run
your upgrade procedure on this dummy instance to see what actions might be needed so that you can
better evaluate the work involved when performing actual data conversion on your original database
instance.
It is a good idea to rebuild and reinstall the Perl
DBD::mysql
module whenever you install a new
release of MySQL. The same applies to other MySQL interfaces as well, such as PHP
mysql
extensions and the Python
MySQLdb
module.
2.19.1.1. Upgrading from MySQL 5.0 to 5.0.10 or Higher
After upgrading a 5.0 installation to 5.0.10 or higher, it is necessary to upgrade your grant tables.
Otherwise, creating stored procedures and functions might not work. The procedure for doing this is
described in
Section 4.4.9, “
mysql_upgrade
— Check Tables for MySQL Upgrade”
.
2.19.1.2. Upgrading from MySQL 4.1 to 5.0
Note
It is good practice to back up your data before installing any new version of
software. Although MySQL works very hard to ensure a high level of quality, you
should protect your data by making a backup.
To upgrade to 5.0 from any previous version, MySQL recommends that you
dump your tables with
mysqldump
before upgrading and reload the dump
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 ...