Documentation Home
MySQL 5.7 Reference Manual
Related Documentation Download this Manual
PDF (US Ltr) - 37.7Mb
PDF (A4) - 37.7Mb
PDF (RPM) - 37.0Mb
HTML Download (TGZ) - 10.2Mb
HTML Download (Zip) - 10.3Mb
HTML Download (RPM) - 8.9Mb
Man Pages (TGZ) - 214.8Kb
Man Pages (Zip) - 327.7Kb
Info (Gzip) - 3.4Mb
Info (Zip) - 3.4Mb
Excerpts from this Manual

MySQL 5.7 Reference Manual  /  ...  /  Upgrading MySQL with Directly-Downloaded RPM Packages

2.11.1.4 Upgrading MySQL with Directly-Downloaded RPM Packages

It is preferable to use the MySQL Yum repository or MySQL SLES Repository to upgrade MySQL on RPM-based platforms. However, if you have to upgrade MySQL using the RPM packages downloaded directly from the MySQL Developer Zone (see Section 2.5.5, “Installing MySQL on Linux Using RPM Packages from Oracle” for information on the packages), go to the folder that contains all the downloaded packages (and, preferably, no other RPM packages with similar names), and issue the following command for platforms other than Red Hat Enterprise Linux/Oracle Linux/CentOS 5:

yum install mysql-community-{server,client,common,libs}-*

For Red Hat Enterprise Linux/Oracle Linux/CentOS 5 systems, there is an extra package (mysql-version-el5-arch.rpm) to be installed; use the following command:

yum install mysql-community-{server,client,common,libs}-* mysql-5.*

Replace yum with zypper for SLES systems, and with dnf for dnf-enabled systems.

While it is much preferable to use a high-level package management tool like yum to install the packages, users who preferred direct rpm commands can replace the yum install command with the rpm -Uvh command; however, using rpm -Uvh instead makes the installation process more prone to failure, due to potential dependency issues the installation process might run into.

For an upgrade installation using RPM packages, the MySQL server is automatically restarted at the end of the installation if it was running when the upgrade installation began. If the server was not running when the upgrade installation began, you have to restart the server yourself after the upgrade installation is completed; do that with, for example, the follow command:

service mysqld start

Once the server restarts, 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.

Note

Because of the dependency relationships among the RPM packages, all of the installed packages must be of the same version. Therefore, always update all your installed packages for MySQL. For example, do not just update the server without also upgrading the client, the common files for server and client libraries, and so on.

Migration and Upgrade from installations by older RPM packages.  Some older versions of MySQL Server RPM packages have names in the form of MySQL-* (for example, MySQL-server-* and MySQL-client-*). The latest versions of RPMs, when installed using the standard package management tool (yum, dnf, or zypper), seamlessly upgrade those older installations, making it unnecessary to uninstall those old packages before installing the new ones. Here are some differences in behavior between the older and the current RPM packages:

Table 2.14 Differences Between the Previous and the Current RPM Packages for Installing MySQL

FeatureBehavior of Previous PackagesBehavior of Current Packages
Service starts after installation is finishedYesNo, unless it is an upgrade installation, and the server was running when the upgrade began.
Service namemysql

For RHEL, Oracle Linux, CentOS, and Fedora: mysqld

For SLES: mysql

Error log fileAt /var/lib/mysql/hostname.err

For RHEL, Oracle Linux, CentOS, and Fedora: at /var/log/mysqld.log

For SLES: at /var/log/mysql/mysqld.log

Shipped with the /etc/my.cnf fileNoYes
Multilib supportNoYes


Note

Installation of previous versions of MySQL using older packages might have created a configuration file named /usr/my.cnf. It is highly recommended that you examine the contents of the file and migrate the desired settings inside to the file /etc/my.cnf file, then remove /usr/my.cnf.

Upgrading to MySQL Enterprise Server.  It is not necessary to remove the MySQL Community Server before upgrading to the MySQL Enterprise Server. Follow the steps given in the README file included with the MySQL Enterprise RPMs.

Interoperability with operating system native MySQL packages.  Many Linux distributions ship MySQL as an integrated part of the operating system. The latest versions of RPMs from Oracle, when installed using the standard package management tool (yum, dnf, or zypper), will seamlessly upgrade and replace the MySQL version that comes with the operating system, and the package manager will automatically replace system compatibility packages such as mysql-community-libs-compat with relevant new versions.

Upgrading from non-native MySQL packages.  If you have installed MySQL with third-party packages NOT from your Linux distribution's native software repository (for example, packages directly downloaded from the vendor), you will need to uninstall all those packages before you can upgrade using the packages from Oracle.


User Comments
Sign Up Login You must be logged in to post a comment.