# First of all , Backup All your Database.
$ mysqldump --all-databases > all_databases.sql
## Add the newer APT package repository from the MySQL APT repository page
$ wget https://dev.mysql.com/get/mysql-apt-config_0.8.10-1_all.deb
$ sudo dpkg -i mysql-apt-config_0.8.1-1_all.deb
> Choose version 5.7 -> OK
## Update your package index
$ sudo apt-get update
## Upgrade all databases
$ sudo apt-get install mysql-server
## Restart MySQL Server
$ sudo service mysql restart