For EL5, EL6, or EL7-based Linux platforms and Fedora 19 or 20, you can upgrade MySQL and its components to the latest GA releases with the MySQL Yum repository.
Before you perform any upgrade actions, please pay attention to the following:
If your version of MySQL is more than one series older than the latest GA series (for example, assuming the current GA release series is 5.6 and you have 5.1.x installed right now), do NOT use the following instructions to update MySQL, and do NOT enable the MySQL Yum repository on your system until you have upgraded MySQL by other means (see Section 2.10.1, “Upgrading MySQL”) to at least the last GA series before the latest one.
Before performing any update to MySQL, follow carefully the instructions in Section 2.10.1, “Upgrading MySQL”. Among other instructions discussed there, it is especially important to back up your database before the update.
If your MySQL installation is a third-party distribution, follow the instructions in Section 2.5.2, “Replacing a Third-Party Distribution of MySQL Using the MySQL Yum Repository” for upgrading the installation.
The Yum update performs an in-place update for MySQL (that is, replaces the old version of the software and then runs the new version off the old version's data files). It updates MySQL to the latest release in the same release series. Assuming that you already have the MySQL Yum repository on your system's repository list (see Adding the MySQL Yum Repository for details), make sure your Yum repository setup is up-to-date by running:
sudo yum update mysql-community-release
You can then update MySQL and its components by the following command:
sudo yum update mysql-server
Alternatively, you can update the MySQL Yum repository setup and MySQL at the same time by telling Yum to update everything on your system (this might take considerably more time):
sudo yum update
Note that by default, the
yum update command
will only update MySQL to the latest version in the same release
series, which means, for example, a 5.6.x installation will NOT
be updated to a 5.7.x release automatically. To update to the
next release series, after updating the MySQL Yum repository
setup as described above, you need to first disable the
sub-repository for your original version and enable the
sub-repository for your target version before you run the
yum update command for MySQL. See the
instructions for doing that in
Enable and Disable the Appropriate Sub-Repositories.
For important information about upgrading from MySQL 5.6 to 5.7, see Upgrading from MySQL 5.6 to 5.7.
The MySQL server always restarts after an update by Yum. Once the server restarts, you should run mysql_upgrade to check and possibly resolve any incompatibilities between the old data and the upgraded software. mysql_upgrade also performs other functions; see Section 4.4.7, “mysql_upgrade — Check and Upgrade MySQL Tables” for details.
Although we recommend that you update all the MySQL components at the same time, you can also update only a specific component. You can use the following command to list all the installed packages for the MySQL components, which can all be updated with the MySQL Yum repository:
sudo yum list installed | grep "^mysql"
After identifying the package name of the component of your
choice, update the package with the following command, replacing
package-name with the name of the
sudo yum update
After updating MySQL using the Yum repository, applications compiled with older versions of the shared client libraries should continue to work.
If you recompile applications and dynamically link them with the updated libraries: As typical with new versions of shared libraries where there are differences or additions in symbol versioning between the newer and older libraries (for example, between the newer, standard 5.6 shared client libraries and some older—prior or variant—versions of the shared libraries shipped natively by the Linux distributions' software repositories, or from some other sources), any applications compiled using the updated, newer shared libraries will require those updated libraries on systems where the applications are deployed. And, as expected, if those libraries are not in place, the applications requiring the shared libraries will fail. So, be sure to deploy the packages for the shared libraries from MySQL on those systems. You can do this by adding the MySQL Yum repository to the systems (see Adding the MySQL Yum Repository) and install the latest shared libraries using the instructions given in Installing Additional MySQL Products and Components with Yum.
Copyright © 1997, 2014, Oracle and/or its affiliates. All rights reserved. Legal Notices