Upgrading mysql server on Centos from 5.5 to 5.6

before upgrading make sure to backup the my.cnf file if you wish to use your former settings

cp /etc/my.cnf /etc/my.cnf_bak_`date +%F`

better also to dump the current mysql data to somewhere else for backup.

remove the current mysql:

yum remove mysql55-server mysql55-libs mysql55-devel mysql55-bench mysql55

take note of the other applications this command removes – we would like to reinstall them later.

add the repository for the relvant mysql – 56 in our case:

cd /root/

wget http://dev.mysql.com/get/mysql-community-release-el6-5.noarch.rpm
yum localinstall mysql-community-release-el6-5.noarch.rpm
yum install mysql-community-server
yum install crontabs mysqltuner yum-cron sysstat postfix

set the service to start on boot:

chkconfig --list mysqld
chkconfig  mysqld on
chkconfig --list mysqld

start the service and upgrade:

service mysqld start
mysql_upgrade

at this point i like to clear the log and restart the mysql to check for errors after the upgrade:

service mysqld stop
echo :> /var/log/mysqld.log
service mysqld start

now you can read the log and check for errors from this fresh upgrade.

if you have a tomcat working with the mysql server, 
better stop the tomcat , clear its logs temp and work folders and restart to have it start clean.

 

 

Technorati Tags: , , ,

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>