mysqldump --all-databases > all_databases.sql
wget https://dev.mysql.com/get/mysql-apt-config_0.8.9-1_all.deb
sudo gdebi mysql-apt-config_0.8.9-1_all.deb
sudo apt-get update
sudo apt-get install mysql-server
After picking 5.7 choose apply
Verify latest version installed
mysql --version
Sample output
mysql Ver 14.14 Distrib 5.7.8-rc, for Linux (x86_64) using EditLine wrapper
Don' forget to run mysql_upgrade after installation to upgrade system tables and restart server, following MySQL Upgrading guide.
mysql_upgrade
or
sudo mysql_upgrade -u root -p
sudo service mysql restart