Installing MySQL 5.7 (Oracle) using APT repository

I got a task to test and deploy the latest MySQL 5.7 from Oracle on Ubuntu and Debian servers. It turns out with MySQL’s APT repository, this is very trivial. Here is how to get MySQL 5.7 installed on Debian-based systems:

1) Download mysql-apt-config from MySQL download page. Just click on the “Download” button then “No thanks, just start my download”. Copy the link and use wget:

$ wget

2) Install the package:

$ sudo dpkg -i mysql-apt-config_0.7.2-1_all.deb

* It will prompt out a wizard to configure APT repository. Choose the first option:

Screen Shot 2016-04-14 at 5.31.39 PM

Then, choose mysql-5.7:Screen Shot 2016-04-14 at 5.31.51 PM

Then, choose OK on the menu:Screen Shot 2016-04-14 at 5.32.09 PM

3) Update repository package list:

$ sudo apt-get update

4) Install MySQL community server:

$ sudo apt-get install mysql-community-server

*This will install all required packages as well.

MySQL 5.7 is now installed! That’s it. Easy peasy.