11.5 Upgrading MySQL
MySQL development is ongoing, and MySQL AB releases new versions frequently. New versions add new features and correct problems found in older versions. Nevertheless, you should not upgrade to a newer version of MySQL without checking the implications and possible difficulties of doing so. Before performing any upgrade, check the MySQL Reference Manual:
Always consult the section on upgrading to see whether there are any notes pertaining to the type of upgrade you're performing. If so, follow the recommended procedures described there. Check the change note sections for versions more recent than your current version to make sure that you're aware of what has changed since your original install. Note particularly any changes that are not backward compatible with your current version because they might require modifications to your existing applications if you upgrade.
Despite those cautionary remarks, upgrading MySQL usually is straightforward and can be done using the following procedure:
- Back up your databases.
- Stop the server.
- Install the new version of MySQL on top of the existing version.
- Start the new server.
If you install a new version on top of an existing one, you might not need to do much reconfiguring. This is common for Windows installations, RPM installations, and installations from source because those types of distributions each tend to use the same installation directory location regardless of MySQL version. (For example, the default location for Windows is always C:\mysql.) However, if you upgrade MySQL using a tar file, the new distribution likely will create a new version-specific base installation directory that differs from your existing installation directory. In this case, some reconfiguration might be necessary. If you have a symbolic link set up that points to the old base directory, you can delete the link and re-create it to point to the new base directory. Subsequent references to the new symbolic link will access the new installation.
When upgrading the server from one MySQL 4.0 version to another, you'll be able to use your old data directory without any changes for the new installation. There are no file incompatibilities when upgrading your server to a newer version.
On the other hand, the InnoDB storage engine did become enabled by default in MySQL 4.0. This does not cause any incompatibility problems, but does cause the server to use more memory by default because it allocates InnoDB-related data structures. If you upgrade from 3.23 to 4.0, but do not want to use InnoDB, you can start the server with the --skip-innodb option to save memory. Similarly, if you run a Max server that includes support for the BDB storage engine, starting the server with the --skip-bdb option saves memory if you don't need BDB tables.
|