Skip to content

Instantly share code, notes, and snippets.

@cosmomathieu
Created February 20, 2018 16:10
Show Gist options
  • Star 6 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save cosmomathieu/826c6b29e122a856f2fbf22f7736f9c7 to your computer and use it in GitHub Desktop.
Save cosmomathieu/826c6b29e122a856f2fbf22f7736f9c7 to your computer and use it in GitHub Desktop.
Upgrade MySQL 5.5 to 5.7 Ubuntu 16

Upgrade MySQL 5.5 to 5.7 Ubuntu 16

First of all , Backup All your Database.

mysqldump --all-databases > all_databases.sql

Grab the library which contains the 5.7 verson

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

Update local packages and install

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

Lastly restart mysql

sudo service mysql restart
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment