I tried to update MySQL from 5.1 to 5.5 in CentOS 6.2. The following is the process I did:
1. rpm -Uvh http://repo.webtatic.com/yum/centos/5/latest.rpm
2. yu
You appear to have been using the wrong Webtatic Yum repository version than the one for your version of CentOS. See http://www.webtatic.com/projects/yum-repository/ for details
e.g.
rpm -Uvh http://mirror.webtatic.com/yum/el6/latest.rpm
You can use a yum plugin made by the IUS community to switch mysql-libs with mysql55w-libs. (the following assuming you still use Webtatic)
yum install mysql yum-plugin-replace
yum replace mysql --replace-with mysql55w
That should allow you to replace mysql with mysql55w-libs, whilst maintaining the older libmysqlclient for any dependencies.
If you see other packages than mysql being removed, then be careful, as they might be needed, but using this method, I've found to be reliable whenever I've used it.
I'm posting this solution as Remi's repository is not always the ideal solution. This method is more complex, but would never cause you to accidentally update your entire web stack by using repositories that use package names matching base distribution packages.
This worked for me after some research and mixing/matching/testing the answers found on various page of the internet (mainly from this page and http://dev.mysql.com/doc/refman/5.6/en/linux-installation-yum-repo.html). My OS shipped with mysql 5.1, I wanted to have 5.6.
[root@host]# cat /etc/*release
CentOS release 6.7 (Final)
[root@host]# uname -a
Linux host 2.6.32-573.3.1.el6.i686 #1 SMP Thu Aug 13 19:58:36 UTC 2015 i686 i686 i386 GNU/Linux
[root@host]# arch
i686
This is installed on a 2006 mac pro 1.1 (CPUs upgraded to 3.0GHz Intel Xeon X5365 Quad-Core).
This was done almost immediately after a fresh install of the OS and system update via yum
yum list installed | grep -i mysql
yum remove mysql mysql-*
yum list installed | grep -i mysql
wget http://dev.mysql.com/get/mysql-community-release-el6-5.noarch.rpm
rpm -Uvh mysql-community-release-el6-5.noarch.rpm
yum install mysql mysql-server
yum list installed | grep -i mysql
chkconfig --list mysqld
sudo chkconfig mysqld on
chkconfig --list mysqld
service mysqld start
service mysqld status
[root@host]# yum list installed | grep -i mysql
compat-mysql51.i686 5.1.54-1.el6.remi @remi
mysql-community-client.i686
5.6.26-2.el6 @mysql56-community
mysql-community-common.i686
5.6.26-2.el6 @mysql56-community
mysql-community-libs.i686
5.6.26-2.el6 @mysql56-community
mysql-community-release.noarch
mysql-community-server.i686
5.6.26-2.el6 @mysql56-community
perl-DBD-MySQL.i686 4.013-3.el6 @base
[root@host]# mysql --version
mysql Ver 14.14 Distrib 5.6.26, for Linux (i686) using EditLine wrapper
https://www.digitalocean.com/community/tutorials/how-to-install-mysql-5-6-from-official-yum-repositories
I had some issues creating users and granting permissions, this how it was fixed.
ERROR 1054 (42S22) at line 1: Unknown column 'plugin' in 'mysql.user'
mysql
SELECT COUNT(1) column_count FROM information_schema.columns WHERE table_schema='mysql' AND table_name='user';
The result was 39, 43 is expected for mysql 5.6update mysql.user set Password=PASSWORD('root') where User='root';
exit
)service mysqld restart
mysql_upgrade -uroot -proot --force
mysql -uroot -proot
SELECT COUNT(1) column_count FROM information_schema.columns WHERE table_schema='mysql' AND table_name='user';
The result was 43 as expected for mysql 5.6. I was then able to create my users and grant permissions as needed.yum list installed | grep -i mysql
yum remove mysql mysql-*
rpm -Uvh http://dl.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm
rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm
yum --enablerepo=remi,remi-test install mysql mysql-server
yum list installed | grep -i mysql
/etc/init.d/mysqld start
## use restart after update
service mysqld start
## use restart after update
chkconfig --levels 235 mysqld on
mysql_upgrade -u root -p
Now my MySql version is 5.5.32
http://www.webtatic.com/packages/mysql55/
http://www.if-not-true-then-false.com/2010/install-mysql-on-fedora-centos-red-hat-rhel/
Hope it help some one
NOTE: Adding comments from @pim (in comments)
Just wanted to add that after the upgrade, my crontab was removed as well. Had to reinstall with "yum install vixie-cron" (CentOS 6)
This blog post helped me upgrade from MySQL 5.5.15 to 5.5.28. That upgrade also had the problem with mysql-libs
clashing with mysql55-libs
.
I used the following commands to add a new YUM repo and make the update:
Download the Remi repo
cd /etc/yum.repos.d
wget http://rpms.famillecollet.com/enterprise/remi.repo
Install/Update the mysql version
yum --enablerepo=remi install mysql-server
OR
yum --enablerepo=remi update mysql-server
Use CentOS-Release-SCL is better and easy.
The Software Collections ( SCL ) Repository
# yum install centos-release-SCL
# yum install mysql55-mysql-server
Done.