Installing MySQL 8 on Ubuntu 20
On this post I will explain how to install MySQL 8 on Ubuntu 20.04 LTS using apt
command.
Before start, please consider that if you just execute sudo apt install mysql-server
on your command line you will get the 5.7 version of MySQL. Because of that, we need to download the latest (and not expired) MySQL APT repository from: https://dev.mysql.com/downloads/repo/apt/.
In my case, i did use the 0.8.15–1 config file version, which is compatible with Ubuntu 20.04.
Finally, use the following commands to install MySQL:
wget https://repo.mysql.com/mysql-apt-config_0.8.15-1_all.deb
sudo dpkg -i mysql-apt-config_0.8.15-1_all.deb
sudo apt update
sudo apt install mysql-server
mysql --version
On previous versions of MySQL config file was necessary execute sudo mysql_secure_installation
to finish and configure the MySQL installation, but since a while this is part of sudo apt install mysql-server
command.
You can check the server status using this command:
sudo service mysql status
Finally, I recommend install MySQL Workbench to manage the databases and models:
sudo apt-get install mysql-workbench
mysql-workbench --version