I know, MySQL 5.5 is quite old, let’s get an upgrade then.
First of all, let’s backup the databases:
1 |
mysqldump --all-databases > all_databases.sql |
Download the latest APT package repository
1 |
wget https://dev.mysql.com/get/mysql-apt-config_0.8.10-1_all.deb |
Make sure you download the latest version of the package. Then instal it using dpkg:
1 |
sudo dpkg -i mysql-apt-config_0.8.10-1_all.deb |
you will be prompted with a dialog box, asking which version to install. If MySQL 5.7 isn’t there, press enter then select the version 5.7 from the list, select OK.
Then run the package update:
1 |
sudo apt-get update |
you will see the MySQL package is on the list:
1 |
Get:5 http://repo.mysql.com jessie/mysql-5.7 Sources [886 B] |
Next step is to install the MySQL:
1 |
sudo apt-get install mysql-server |
This is the most important step you can’t miss, upgrade the existing databases:
1 |
sudo mysql_upgrade -u root -p |
Final step, restart the database:
1 |
sudo /etc/init.d/mysql restart |
Done!