How to Install MySQL 8 on Ubuntu 18.04

How to Install MySQL 8 on Ubuntu 18.04

MySQL is an open source software for the Relational Database Management System. MySQL is one of the server application packages for websites that are often referred to as LAMP (Linux Apache MySQL PHP) servers.

0.Install MySQL Repository

By default the MySQL version available on Ubuntu 18.04 is MySQL 5.7.

apt show mysql-server v5.7
apt show mysql-server v5.7

In order to be able to install MySQL 8 on Ubuntu 18.04 first, install the MySQL 8 repository.

Download the repository file configuration file MySQL 8.

Installing the downloaded .deb file.

The question Which MySQL product do you want to configure? is displayed, select Ok.

Configuring mysql-apt-config
Configuring mysql-apt-config

Run the update.

Verify the mysql-server version.

apt show mysql-server v8.0
apt show mysql-server v8.0

1.Install MySQL

After the MySQL repository is installed, run the MySQL server installation.

Enter the MySQL root user password.

Enter root password
Enter root password

Then Ok.

Informasi metode authentication
Authentication method

Select Use Strong Password Encryption (RECOMENDED).

Memilih authentication plugin
Choose the authentication plugin

After installation is complete, check the mysql service status, it must active (running).

Status mysql service
mysql service status

2.Securing the MySQL server installation

Securing the MySQL server installation

Enter the user’s root password.

VALIDATE PASSWORD COMPONENT to use a strong MySQL user password. Answer y if you want to activate it.

Choose a password strength level.

Changing the root password, answer n if you don’t want to change it.

Remove anonymous users, answer y.

Do not allow root to remote database, answer .

Remove the test database, answer y.

Reload tabel privileges, answer y.

3.Testing

Login to MySQL with the root user.

Login ke mysql
Login to mysql

Good luck 🙂

Leave a Reply