Create a gist now

Instantly share code, notes, and snippets.

yum replace mysql51
1. Base MySQL
[root@208934-el5-64 mysql]# rpm -qa | grep mysql
mysql-5.0.77-4.el5_5.4.x86_64
mysql-server-5.0.77-4.el5_5.4.x86_64
2. yum replace mysql with mysql51
[root@208934-el5-64 mysql]# yum replace mysql --replace-with mysql51 --enablerepo=ius
Loaded plugins: replace, rhnplugin, security
ius | 1.9 kB 00:00
Excluding Packages in global exclude list
Finished
Excluding Packages from Extra Packages for Enterprise Linux 5 - x86_64
Finished
Replacing packages takes time, please be patient...
WARNING: Unable to resolve all providers: ['config(mysql)', 'libmysqlclient.so.15()(64bit)', 'libmysqlclient.so.15(libmysqlclient_15)(64bit)', 'libmysqlclient_r.so.15()(64bit)', 'libmysqlclient_r.so.15(libmysqlclient_15)(64bit)', 'config(mysql-server)']
This may be normal depending on the package. Continue? [y/N] y
Resolving Dependencies
--> Running transaction check
---> Package mysql.x86_64 0:5.0.77-4.el5_5.4 set to be erased
--> Processing Dependency: libmysqlclient.so.15()(64bit) for package: perl-DBD-MySQL
--> Processing Dependency: libmysqlclient.so.15(libmysqlclient_15)(64bit) for package: perl-DBD-MySQL
---> Package mysql-server.x86_64 0:5.0.77-4.el5_5.4 set to be erased
---> Package mysql51.x86_64 0:5.1.56-1.ius.el5 set to be updated
--> Processing Dependency: mysql51-libs = 5.1.56-1.ius.el5 for package: mysql51
--> Processing Dependency: libmysqlclient_r.so.16(libmysqlclient_16)(64bit) for package: mysql51
--> Processing Dependency: libmysqlclient.so.16(libmysqlclient_16)(64bit) for package: mysql51
--> Processing Dependency: mysqlclient15 for package: mysql51
--> Processing Dependency: libmysqlclient.so.16()(64bit) for package: mysql51
--> Processing Dependency: libmysqlclient_r.so.16()(64bit) for package: mysql51
---> Package mysql51-server.x86_64 0:5.1.56-1.ius.el5 set to be updated
--> Processing Dependency: perl-DBD-MySQL for package: mysql51-server
--> Running transaction check
---> Package mysql51-libs.x86_64 0:5.1.56-1.ius.el5 set to be updated
---> Package mysql51-server.x86_64 0:5.1.56-1.ius.el5 set to be updated
--> Processing Dependency: perl-DBD-MySQL for package: mysql51-server
---> Package mysqlclient15.x86_64 0:5.0.92-1.ius.el5 set to be updated
---> Package perl-DBD-MySQL.x86_64 0:3.0007-2.el5 set to be erased
--> Processing Dependency: perl-DBD-MySQL for package: mysql51-server
--> Finished Dependency Resolution
mysql51-server-5.1.56-1.ius.el5.x86_64 from ius has depsolving problems
--> Missing Dependency: perl-DBD-MySQL is needed by package mysql51-server-5.1.56-1.ius.el5.x86_64 (ius)
mysql51-server-5.1.56-1.ius.el5.x86_64 from ius has depsolving problems
--> Missing Dependency: perl-DBD-MySQL is needed by package mysql51-server-5.1.56-1.ius.el5.x86_64 (ius)
--> Running transaction check
---> Package mysql51-server.x86_64 0:5.1.56-1.ius.el5 set to be updated
---> Package perl-DBD-MySQL.x86_64 0:3.0007-2.el5 set to be erased
--> Finished Dependency Resolution
Dependencies Resolved
============================================================================================================================================================
Package Arch Version Repository Size
============================================================================================================================================================
Installing:
mysql51 x86_64 5.1.56-1.ius.el5 ius 1.1 M
mysql51-server x86_64 5.1.56-1.ius.el5 ius 11 M
Removing:
mysql x86_64 5.0.77-4.el5_5.4 installed 8.1 M
mysql-server x86_64 5.0.77-4.el5_5.4 installed 22 M
Installing for dependencies:
mysql51-libs x86_64 5.1.56-1.ius.el5 ius 1.7 M
mysqlclient15 x86_64 5.0.92-1.ius.el5 ius 1.7 M
Transaction Summary
============================================================================================================================================================
Install 4 Package(s)
Upgrade 0 Package(s)
Remove 2 Package(s)
Reinstall 0 Package(s)
Downgrade 0 Package(s)
Total download size: 16 M
Is this ok [y/N]: y
Downloading Packages:
(1/4): mysql51-5.1.56-1.ius.el5.x86_64.rpm | 1.1 MB 00:00
(2/4): mysqlclient15-5.0.92-1.ius.el5.x86_64.rpm | 1.7 MB 00:00
(3/4): mysql51-libs-5.1.56-1.ius.el5.x86_64.rpm | 1.7 MB 00:00
(4/4): mysql51-server-5.1.56-1.ius.el5.x86_64.rpm | 11 MB 00:03
------------------------------------------------------------------------------------------------------------------------------------------------------------
Total 2.8 MB/s | 16 MB 00:05
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Repackaging : mysql 0/6
Repackaging : mysql-server 0/6
Installing : mysqlclient15 1/6
Installing : mysql51-libs 2/6
========================================================================
Please note that if you are upgrading major versions of MySQL
you must run the following script after installation:
/usr/bin/mysql_upgrade -t /tmp
========================================================================
Installing : mysql51 3/6
Installing : mysql51-server 4/6
Erasing : mysql 5/6
Erasing : mysql-server 6/6
Removed:
mysql.x86_64 0:5.0.77-4.el5_5.4 mysql-server.x86_64 0:5.0.77-4.el5_5.4
Installed:
mysql51.x86_64 0:5.1.56-1.ius.el5 mysql51-server.x86_64 0:5.1.56-1.ius.el5
Dependency Installed:
mysql51-libs.x86_64 0:5.1.56-1.ius.el5 mysqlclient15.x86_64 0:5.0.92-1.ius.el5
Complete!
3. Verify RC script is in place and installed:
[root@208934-el5-64 mysql]# service mysqld status
mysqld is stopped
[root@208934-el5-64 mysql]# /etc/init.d/mysqld status
mysqld is stopped
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment