Warning
This article is old, and some of the information may be outdated or no longer valid today.
If you have any questions or need to confirm any details, we recommend contacting our support team for up-to-date information and personalized assistance.
In the following tutorial, we will explain how to upgrade MySQL 5.5 to 5.6 on all the distributions we currently offer.
The tutorials have been tested on VPS with images of Debian 8, Ubuntu 14.04.5 LTS and CentOS 7.
Next, click the name of your distribution to see the full tutorial:
Preparation
The first thing to do is create a backup of our server or a snapshot (snapshot). Once we have this, we can proceed with the tutorial.
We check the current MySQL version with:
mysql Ver 14.14 Distrib 5.5.55, for debian-linux-gnu (x86_64) using readline 6.3
Then we create a copy of the MySQL configuration file:
# cp /etc/mysql/my.cnf{,.old}
Add a repository
The next step is to add the APT repository for MySQL from which we will install the new version. To do this, we need to access this website, where we can download an executable file to install the repository.
# wget https://dev.mysql.com/get/mysql-apt-config_0.8.6-1_all.deb
And install it:
# dpkg -i mysql-apt-config_0.8.6-1_all.deb
During installation, we will be asked to configure the package. We will need to select the version of MySQL Server and the other components.
We update the repositories:
# apt-get update
And upgrade MySQL:
# apt-get install mysql-server
During installation, we will be advised to back up the data.
Once the process has finished, we run the command again to see the version:
mysql Ver 14.14 Distrib 5.6.36, for Linux (x86_64) using EditLine wrapper
And confirm that the service is running correctly:
* MySQL Community Server 5.6.36 is running
Preparation
The first thing to do is create a backup of our server or a snapshot (snapshot). Once we have this, we can proceed with the tutorial.
We can back up our databases as follows. First, we stop the MySQL service:
# service mysqld stop
Then we create a folder for the backup and copy the /var/lib/mysql directory:
# mkdir /backup
# cp -aR /var/lib/mysql/* /backup
We check the current MySQL version with:
mysql Ver 14.14 Distrib 5.5.55, for Linux (x86_64) using EditLine wrapper
Add the repository
The next step is to add the repository for MySQL from which we will install the new version.
First, we disable the Atomic repository, if it is enabled:
enabled = 0
We install the community repository for MySQL:
# yum install http://dev.mysql.com/get/mysql57-community-release-el6-7.noarch.rpm
Once the repository is installed, we modify the /etc/yum.repos.d/mysql-community.repo file and disable MySQL 5.7 while enabling MySQL 5.6:
[mysql56-community]
enabled=1
[mysql57-community]
enabled=0
We update the repositories:
# yum update
And upgrade MySQL:
# yum update mysql-server
Finally, we start the MySQL service again:
# service mysqld start
Once the process has finished, we run the command to see the version:
mysql Ver 14.14 Distrib 5.6.36, for Linux (x86_64) using EditLine wrapper