Upgrade to Percona MySQL 5.6

Backup MySQL DB

# Take Database Dump
wget https://raw.githubusercontent.com/MiteshShah/admin/master/backup/mysqldump.sh
bash mysqldump.sh

# Cross check database dump
ls /var/www/mysqldump

mkdir -p /backup/mysql/data
service mysql stop
cp -av /etc/mysql /backup
cp -av /var/www/mysqldump /backup/mysql
cp -av /var/lib/mysql/ /backup/mysql/data

Remove MySQL 5.5 Packages

apt-get purge mysql-server*
apt-get autoremove

Install Percona MySQL 5.6

ee stack install mysql

Install PV command:

apt-get update
apt-get install pv

Import Database:

cd /var/www/mysql 
gunzip * 
pv example_com.13Oct2014142434 | mysql example_com

 

How to revert

In any case you can face some issue, you can revert it using following commands:

Remove Percona MySQL 5.6

ee stack purge mysql

 

Install MySQL 5.5

apt-get install mysql-server

 

Import Database

cd /var/www/mysqldump
gunzip * pv example_com.13Oct2014142434 | mysql example_com

 

 

Leave a Reply