Upgrading MySQL 5.5 to 5.7 in Debian

First of all, let’s backup the databases:

Download the latest APT package repository

Make sure you download the latest version of the package. Then instal it using dpkg:

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:

you will see the MySQL package is on the list:

Next step is to install the MySQL:

This is the most important step you can’t miss, upgrade the existing databases:

Final step, restart the database: