Wednesday, June 17, 2015

update mysql server from mysql 5.1 to mysql 5.5 on CentOS-6

First, to set up the yum repository, install the webtatic-release RPM based on your CentOS/RHEL release:
Webtatic EL6 for CentOS/RHEL 6.x
rpm -Uvh
Webtatic EL5.1 for CentOS/RHEL 5.x:
rpm -Uvh
If you already have MySql client or server installed (rpm -q mysql mysql-server), then you can upgrade using the following method:
yum install mysql.`uname -i` yum-plugin-replace
yum replace mysql --replace-with mysql55w
“yum install mysql” is only there to make sure yum-plugin-replace can resolve dependencies correctly if only mysql-server was installed.
Otherwise, to install MySql client and server, then run:
yum install mysql55w mysql55w-server
You should upgrade existing tables before setting the server to become a production machine, which can be done by starting the server and running the mysql_upgrade script (this may take time depending on the size of the database).
service mysqld start
# This will issue a password prompt for the user. If you don't have a root user password, remove the "-p"
mysql_upgrade -u root -p

from :

another simple command upgrade all packages : yum upgrade

another method

To list Old MySql

yum list installed | grep -i mysql

To remove Old MySql

yum remove mysql mysql-*

Remi Dependency on CentOS 6 and Red Hat (RHEL) 6

rpm -Uvh

rpm -Uvh

Install MySQL server

yum --enablerepo=remi,remi-test install mysql mysql-server

To list New MySql

yum list installed | grep -i mysql

start MySql server

/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

from :