Oracle Linux had a lot of engineering hours inside it to drive the performance to new levels. But currently oracle Linux 6.4 comes with a dated version of MySQL, version 5.1.69. So how can you upgrade to 5.6 without losing your data?
First, make a backup just in case Murphy’s Law has a tort waiting for you.
Remove the old files. The
rpm -qa | grep -i ^mysql command will show you the packages to be removed. Then
rpm -e mysql-server-5.1.69-1.el6_4.x85_64 mysql-libs-5.1.69-1.el6_4.x86_64 and mysql-5.1.69-1.el6_4.x85_64 to remove them.
Thirdly, download the big MySQL 5.6 bundle for Oracle Linux. Untar the bundle and then a quick
rpm -Uhv MySQL-*.rpm will install the files.
There is ONE big difference. MySQL as of 5.6, forces a default for the MySQL server and places it in
/root/.mysql_secret and you will see to set a new password upon login as the assigned password is marked ‘expired’. Start up MySQL (
/etc/init.d/mysql start) and use SET PASSWORD to change the password (unless you really like the password randomly generated you find in
/root/.mysql and want to keep it.
Go double check you data just to make certain all is well.
And please note by using a status command (
\s) that the charactersets may have changed. Under 5.1 the default is all Latin1. With 5.6, the server and Database charactersets are Latin1 while the client and the Connection character sets are Utf-8. Do not mix and match as somewhere in the to and frow, your data will be truned to useless goo. So stick with ALL Latin1 if you can, or force everything in your configuration files do use Utf8.
So now we have MySQL 5.6 on the fastest Linux and it is time to get busy with them!