You are on page 1of 1

MYSQL Upgradation on TrackMyBeat:

1) Take backup of required database.


mysqldump tmb > tmb_09052016.sql
2) Take backup mysql libraries (optional but its good if done)
mv /var/lib/mysql/ /var/lib/mysql_backup
3) Get rpm packages for the required mysql version as:
MySQL-shared-5.6.26-1.el6.x86_64.rpm
MySQL-client-5.6.26-1.el6.x86_64.rpm
MySQL-server-5.6.26-1.el6.x86_64.rpm
And save them in opt folder (say)
4) Install the packages in given order:
rpm -ivh MySQL-shared-5.6.26-1.el6.x86_64.rpm
rpm -ivh MySQL-client-5.6.26-1.el6.x86_64.rpm
rpm -ivh MySQL-server-5.6.26-1.el6.x86_64.rpm

5)
6)
7)
8)
9)

at the end of mysql-server installation a file is given where temporary


password is stored.
In our case the file was /root/.mysql_secret
Start mysql service
/etc/init.d/mysql start
Now start mysql to set a new password
mysql u root p
Give here the temporary password you get from /root/.mysql_secret file.
Execute this command to set new password
SET PASSWORD for 'root'@'localhost'=PASSWORD('xxxxxx');
Now exit from mysql and re-login with the password given above.
Restore the db using:
mysql -u root -p tmb < tmb_09052016.sql

You might also like