How To Install Latest Version of MySQL on Ubuntu

Complete manual with the steps to be able to install the most recent version of MySQL on Ubuntu Systems.

Step 1: Add MySQL Repository

In the first place, it will be necessary to install the .deb package of the official site since in this the developers manage the configuration and installation of the respective repositories.

For this, we go to MySQL page and download MYSQL

There we find in the bottom right the download button, and the download window will be displayed where we must enter our login credentials in the Oracle account, we can skip this step by clicking on the option No thanks, just start my download¸to start the download automatically.

We can copy this link to download it in Ubuntu, once we have saved this link we go to the directory tmp to install it there:

cd / tmp

Once we are in this directory we will download the .deb package using curl, for this, we execute the following:

curl -OL

Step 2: Install the .deb package

It is important to clarify that dpkg allows us to perform tasks on .deb packages such as inspect, analyze and install.

sudo dpkg -i mysql-apt-config*

When executing this command, the following window will be displayed where we have the opportunity to define which MySQL product we want to install, in this case, we select the OK option, using the scroll arrows to set the default values. This will install the respective package.

Step 3: Update all packages

Once installed, we will execute the following command to update all the packages of the system including the newly installed package:

sudo apt update

Now we will delete the downloaded .deb file:

rm mysql-apt-config*

In case you need to update these repositories at some point, execute the following commands:

sudo dpkg-reconfigure


Step 4: Install MySQL

Once you configure these parameters proceed to install MySQL officially, for this, we will run the following command.

sudo apt install mysql-server

During the installation process it will be necessary to enter the root password for the MySQL database:

We can check the status of MySQL by executing the following command. We can see that his state is active.

systemctl status mysql

Step 5: Configure MySQL Security

MySQL includes a command that gives us the possibility to update various parameters associated with the security of the application, for this we will execute the following:


Once we run this command, a series of parameters related to the application will be displayed in Ubuntu. First of all, we must enter the root password that we have previously assigned:

In this way we have updated to the latest version of MySQL in Ubuntu 16.10 and have secured the same.

Similar Posts

Leave a Reply

Your email address will not be published. Required fields are marked *