Categories
MySQL Ubuntu

How to Install MySQL 8 on Ubuntu 19.10 & 18.04 – Easy Way

Hello, this post will help you install MySQL Server version 8 on Ubuntu 18.04, Ubuntu 19.04. By the way, Ubuntu 19.10. Ubuntu 19.10 is my favorite of all time. If you have not installed Ubuntu 19.10 yet.

Hello, this post will help you install MySQL Server version 8 on Ubuntu 18.04, Ubuntu 19.04.

By the way, Ubuntu 19.10. Ubuntu 19.10 is my favorite of all time. If you have not installed Ubuntu 19.10 yet. Go ahead and upgrade your Ubuntu. You would not regret; I promise.

For this demonstration, I will be using Ubuntu 19.10, for sure.

Go ahead and launch your terminal and update the system with the following commnad.

sudo apt update && upgrade

Install MySQL 8 Client & Server

Clear your terminal and type the following command to install mysql 8 client and server.

sudo apt install mysql-server -y

Wait for a minute or two and you are done.

Now, we need to alter mysql root password. First login with sudo user to MySQL server. just type the following commands.

sudo mysql

Type your Ubuntu sudo password and hit enter.

Now, let’s change/assign the new password to the MySQL root user.

You are advised to choose a strong password, I have typed xxxxx

ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'XXXXX';

Now, flush privileges with the following command

FLUSH PRIVILEGES;

You have successfully installed MySQL 8 on your Ubuntu now.

Let’s exit and log back in to MySQL server with new root password

exit
mysql -u root -p

Type in your new password and you are in..

Here are few MySQL commands that can help you get started with

CREATE DATABASE dbname;
SHOW DATABASES;

For more you can watch my MySQL database video tutorial

By Tube Mint

I am a YouTuber and I also do niche marketing. In the process of create my niche blog using WordPress, Drupal, and GatsbyJS, I learned a few things like html, css, JS, CMS, MVC frameworks, C++, Python, Ruby, MySQL, Windows and Linux. After some time.. I realized that I can share my knowledge with people on YouTube and through my blog. So, here I am. You can ask me if you have any question about these technologies.
Thanks,
@TubeMint