Upgrading MySql to 5.2

5 posts / 0 new
Last post
#1 Mon, 10/17/2016 - 12:02
bill56

Upgrading MySql to 5.2

Hello:

I am running CentOS Linux 6.8, Virtualmin 5.04, Webmin 1.810

Updates are current.

MySql is on version 5.1.73-7.el6

PCI compliance (Trans Armor) is asking for a minimum of 5.2 for MySql. Will this be updated in Virtualmin soon, or can / should I update MySql outside of Virtualmin?

Thanks,

Bill56

Sun, 11/13/2016 - 19:18
applejack

It's nothing to do with Virtualmin whether it is updated but with Centos and as far as I know is unlikely so you have to replace it.

I used the IUS repo

If your architecture is 64 bit

wget https://dl.iuscommunity.org/pub/ius/archive/CentOS/6/x86_64/ius-release-1.0-13.ius.centos6.noarch.rpm
rpm -Uvh ius-release*.rpm

If your architecture is 32 bit

https://dl.iuscommunity.org/pub/ius/archive/CentOS/6/i386/ius-release-1.0-13.ius.centos6.noarch.rpm
rpm -Uvh ius-release*.rpm

Go to /etc/yum.repos.d and edit ius-archive.repo and for the first instance of enabled=0 set to enabled=1 and save

yum install yum-plugin-replace

REPLACING MYSQL5.1 WITH MYSQL5.5

service mysqld stop
rpm -e --nodeps mysql
rpm -e --nodeps mysql-server
yum  replace mysql-libs --replace-with mysql55-libs
yum install mysql55-server
chkconfig mysqld on
service mysqld start
service mysqld status

Go to /etc/yum.repos.d and edit ius-archive.repo and for the first instance of enabled=1 set to enabled=0 and save.

REPLACiNG MYSQL55 WITH MYSQL56u IF YOU WISH OR THERE IS ALSO 57u

N.B. Do not upgrade directly from 5.5. to 5.7 according to the MySql docs you must upgrade one verison at a time.

service mysqld stop
rpm -e --nodeps mysql55
rpm -e --nodeps mysql55-libs
rpm -e --nodeps mysql55-server
rpm -e --nodeps mysql55-devel

yum --enablerepo=ius install mysql56u
yum --enablerepo=ius install mysql56u-libs
yum --enablerepo=ius install mysql56u-server
yum --enablerepo=ius install mysql56u-devel

chkconfig mysqld on
service mysqld start
service mysqld status

mysql_upgrade -uroot -pMYPASSWORD
mysqlcheck -uroot -pMYPASSWORD --all-databases
Fri, 10/28/2016 - 21:27
bill56

Applejack - Thanks! Worked like a charm.

Bill56

Fri, 10/28/2016 - 22:00 (Reply to #3)
applejack

My pleasure, glad you got it sorted.

Tue, 11/15/2016 - 19:28
applejack

Updating to MySQL 5.6 + when using a password on the command line i.e. for a mysqldump it throws a warning. This I found out stops Virtualmin clone and restore of the databases. The solution provided by Jamie was that there is a file /root/.my.cnf which at least in my instance contains

[client]
user=myuesr
password="mypasword"

If you remove these then restoring and cloning works.

Topic locked