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.
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
You have successfully installed MySQL 8 on your Ubuntu now.
Let’s exit and log back in to MySQL server with new root password
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;
For more you can watch my MySQL database video tutorial