How To Install MySQL 8 On Ubuntu 18.04 — isw blog

In this article, we learn how to install and initially configure MySql 8.0 Server on Ubuntu 18.04 LTS Server.

Mysql is one of the most used and famous Relational Database Server available on the internet because It is very reliable and secure and also it’s easy to learn and operate it. MySql uses SQL “Structured Query Language” for performing operations.

We will learn it in some simple steps. So let’s start with the first step.

Step 1: Download MySql 8 Package

At the very first step, we have to Download the MySql repository using the wget command :

wget https://dev.mysql.com/get/mysql-apt-config_0.8.13-1_all.deb

Step 2: Configure MySql 8 Package

After that, install the repository package using below command:

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

Select OK when asked for choosing MySql product to configure but By default, the latest version 8 is selected like the below image.

Step 3: Install MySql 8 Package

After this, use the below command for begun the installation of MySql Community Server 8.

sudo apt-get update sudo apt-get install mysql-server

Note: Run below commands only if you get an error like this — “mysql-server : Depends: mysql-community-server (= 8.0.12–1ubuntu18.04) but it is not going to be installed”

sudo add-apt-repository universe sudo apt update sudo apt install libmecab2

Step 3.1: Set MySql root password

In the first step, you need to set up the root user password for MySql Server because the “root” is the default user for the MySql server.

Step 3.2: Choose MySql authentication method

In this step, you have to choose the default authentication plugin for MySQL.

Remember: if you choose the first option “Strong Password Encryption” then the Old Authentication method will not work and your old Web Application did not work if you do not update them according to MySql 8 because the SQL Query for password authentication is changed.

That’s why if you want to run a previously developed web application with MySql 8, I suggest the Second option “Legacy Authentication Method”. You can see the options in the below image:

Step 3.3: Confirm MySql installation

After that, confirm that the MySQL server is successfully installed in our system with running the below command:

sudo dpkg -l | grep "mysql-community"

Now, you should see the following output:

Step 3.4: Secure MySql installation

By default, MySQL installation is a little insecure and therefore we need to secure it.

sudo mysql_secure_installation

After that, you will be asked to choose some options. At first step, you will be asked for MySQL root password which one you create during MySQL installation.
In the next step, you will be asked to choose whether to enable the “ Validate Password” plugin or not because this plugin is used for checking MySql user password for a standard format to increase the security.

After that, you have to choose yes or no for some security questions but I recommend that you should choose the below-given answers:

  • Remove anonymous users? (Press y)
  • Disallow root login remotely? (Press y)
  • Remove test database and access to it? (Press y)
  • Reload privilege tables now? (Press y)

After that, you should get the below screen:

Step 3.5: Start and Enable MySql service

After that let’s enable the MySQL server for boot time and start the server by below commands:

sudo systemctl start mysql sudo systemctl enable mysql sudo systemctl status mysql

After that, you should get the below status:

Now we have successfully installed and running MySql database server.

Step 3.6: Get access to MySql Server

After that, you can try to login in with the below commands:

sudo mysql -uroot -pMypassword

So in this tutorial, we successfully learn how to install and securing MySql 8 Database Server but if you feel that something is missing or hard to understatnd, please mention that in the comment section. Also, you can suggest topics for the next article.

How do I Install MySQL 8.0 Linux Ubuntu, how to install mysql, how to install mysql 8 in ubuntu 18.04, how to install mysql 8 ubuntu 18.04, how to install mysql latest version on ubuntu 18.04, how to install mysql on ubuntu 18.04, how to install mysql server on ubuntu 18.04, install mysql 8 on ubuntu 18, install mysql 8 server, mysql 8 on ubuntu 18, mysql 8 with ubuntu 18, ubuntu 18 mysql tutorial, ubuntu 18.04 mysql

Originally published at https://www.itsupportwale.com on September 15, 2019.

--

--

--

IT Support wale is the best IT services provider in Indore. We provide Server Management, Email Server, Call Center Software & VOIP services.

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Azure Key Vault Governance using Azure Policy

Unity native GPS plugin (iOS and Android)

How To Clear Browser Cache

Openshift : Pioneer in the World of Automation

In this tutorial we will cover the three forms of the accepted dependency injection in Flutter.

Blog Application in Django

Tutorial — Setting up Terraform Cloud with Github

Apache+PHP Enable GZIP for reduce JSON response size

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
IT Support Wale

IT Support Wale

IT Support wale is the best IT services provider in Indore. We provide Server Management, Email Server, Call Center Software & VOIP services.

More from Medium

Being careful with user INPUT: sanitizing

Hack The Box’s Learn the basics of Penetration Testing: Appointment

API Authentication & Environment Variables — Python

Create a simple custom image