1. Download the MySQL APT repository config tool

wget http://dev.mysql.com/get/mysql-apt-config_0.7.3-1_all.deb

  1. Install the MySQL APT repository config tool

dpkg -i mysql-apt-config_0.7.3-1_all.deb

You will be asked to select product and version that you want to install. In the first step, select Server and next select either mysql-5.6 or mysql-5.7. Then click Apply.

  1. Update APT

apt-get update

  1. Install the server

sudo apt install mysql-server mysql-client

That’s all!