Upgrading from the earlier MySQL RPM Format to Yum Repos

The packages that are available in the yum repos contain a number of enhancements over the RPM packages that are available from dev.mysql.com.
Norvald blogged on some of these enhancements earlier. Today I wanted to walk through a safe upgrade path, as they are not quite compatible with each-other.
My Existing Installation
To start with, the packages I have installed came from “Red Hat Enterprise Linux 6 / Oracle Linux 6 (x86, 64-bit), RPM Bundle” on dev.mysql.com. You can check which packages you have installed with:
[root@localhost ~]# rpm -qa | grep -i mysql
MySQL-client-5.6.14-1.el6.x86_64
MySQL-embedded-5.6.14-1.el6.x86_64
MySQL-server-5.6.14-1.el6.x86_64
MySQL-shared-5.6.14-1.el6.x86_64
MySQL-devel-5.6.14-1.el6.x86_64
MySQL-test-5.6.14-1.el6.x86_64
MySQL-shared-compat-5.6.14-1.el6.x86_64
Uninstalling and Installing Yum repos
I recommend first running yum update before installing the new repo:
yum update
yum localinstall http://repo.mysql.com/mysql-community-release-el6-3.noarch.rpm
After this step, stop MySQL (note the missing d in the dev.mysql.com packages):
service mysql stop
Now with yum shell it’s possible to uninstall the existing packages (listed in ‘my existing installation’ above) and install the replacement packages from the yum repo in one step:
yum shell
> remove MySQL-client-5.6.14-1.el6 MySQL-embedded-5.6.14-1.el6 MySQL-server-5.6.14-1.el6 MySQL-shared-5.6.14-1.el6 MySQL-devel-5.6.14-1.el6 MySQL-test-5.6.14-1.el6 MySQL-shared-compat-5.6.14-1.el6 > install mysql-community-server
> run
Here was the summary output from my yum session:
============================================================================================================================
Package Arch Version Repository Size
============================================================================================================================
Installing:
mysql-community-server x86_64 5.6.14-3.el6 mysql-community 51 M
Removing:
MySQL-client x86_64 5.6.14-1.el6 @/MySQL-client-5.6.14-1.el6.x86_64 81 M
MySQL-devel x86_64 5.6.14-1.el6 @/MySQL-devel-5.6.14-1.el6.x86_64 19 M
MySQL-embedded x86_64 5.6.14-1.el6 @/MySQL-embedded-5.6.14-1.el6.x86_64 432 M
MySQL-server x86_64 5.6.14-1.el6 @/MySQL-server-5.6.14-1.el6.x86_64 235 M
MySQL-shared x86_64 5.6.14-1.el6 @/MySQL-shared-5.6.14-1.el6.x86_64 8.4 M
MySQL-shared-compat x86_64 5.6.14-1.el6 @/MySQL-shared-compat-5.6.14-1.el6.x86_64 11 M
MySQL-test x86_64 5.6.14-1.el6 @/MySQL-test-5.6.14-1.el6.x86_64 318 M
Installing for dependencies:
mysql-community-client x86_64 5.6.14-3.el6 mysql-community 18 M
mysql-community-common x86_64 5.6.14-3.el6 mysql-community 296 k
mysql-community-libs x86_64 5.6.14-3.el6 mysql-community 1.8 M
Removing for dependencies:
cronie x86_64 1.4.4-7.el6 @anaconda-CentOS-201303020151.x86_64/6.4 166 k
cronie-anacron x86_64 1.4.4-7.el6 @anaconda-CentOS-201303020151.x86_64/6.4 43 k
crontabs noarch 1.10-33.el6 @anaconda-CentOS-201303020151.x86_64/6.4 2.4 k
postfix x86_64 2:2.6.6-2.2.el6_1 @anaconda-CentOS-201303020151.x86_64/6.4 9.7 M
Transaction Summary
============================================================================================================================
Install 4 Package(s)
Remove 11 Package(s)
MySQL should now be installed from the yum packages. You just have two more steps to complete – start it, and configure it on boot:
service mysqld start # note the added ‘d’
chkconfig mysqld on
Still having problems? I recommend heading to the MySQL Forums. There is a section dedicated to Install & Repo help.
via Planet MySQL
Upgrading from the earlier MySQL RPM Format to Yum Repos