INSTALL MYSQL 8.0 ON UBUNTU 16.04 / 17.10 / 18.04

This brief tutorial shows web developers  and new users how to install the latest MySQL 8.0 on Ubuntu 16.04 / 17.10 and 18.04…

Nowdays, everywhere you look you’ll find MariaDB database server being used with many opensource projects… This was not the case few years ago.

Then, MySQL was the probably the only databse server used in majority of the opensource projects… Because of licenses changes made by Oracle, MariaDB was introduced and the opensource community migrated to MariaDB instead…

MySQL is now far behind MariaDB in many opensource project… Many of our LAMP and LEMP tutorials used MariaDB as well.

However, some project still work better with MySQL and have not fully enbraced MariaDB… and for those folks, MySQL should be installed…

To install the latest version MySQL follow steps below:

Step 1 Get MySQL APT Repository

The MySQL package version that comes with Ubuntu default repositories is not the latest version… If you need to install the latest version of MySQL database, you may want to install its repository in Ubuntu..

Go to the link below download the APT repository

The repository package for Ubuntu and others can be downloaded from the link below…

https://dev.mysql.com/downloads/repo/apt/

Visit the download page and look for Ubuntu / Debian (Architecture Independent), DEB Package. The click the Download button to get the repository package…

You can also use the command line to download.. changing the version number of the package.

cd /tmp/ && wget https://dev.mysql.com/get/mysql-apt-config_0.8.10-1_all.deb

Then run the commands below to install

sudo dpkg -i mysql-apt-config_0.8.10-1_all.deb

When you run the commands above, you should get a config prompt.. just select OK as shown in the image below.

MySQL APT Repo features MySQL Server along with a variety of MySQL components. You may select the appropriate product to choose the version that you wish to receive.

Step 2: Install MySQL 8.0

Now that the repository is installed, run the commands below to install

sudo apt update
sudo apt install mysql-server mysql-client

That will install the latest version MySQL on your system… During the installation, you should be prompted to create and confirm a MySQL root password.

Also, you confirm wheather you want to use the new password encryption feature… it’s recommended.

After that, MySQL should be installed… you can logon by running the commands

sudo mysql -u root -p

You should see MySQL welcoem screen shown below:

Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 8
Server version: 8.0.11 MySQL Community Server - GPL

Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

That how to install the latest version of MySQL on Ubuntu..

Add a Comment

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