To install MySQL Server on Ubuntu 20.04 LTS, you can use the following steps:
wget https://dev.mysql.com/get/mysql-apt-config_0.8.15-1_all.deb sudo dpkg -i mysql-apt-config_0.8.15-1_all.deb
This will add the MySQL repository to your system and allow you to install MySQL packages using apt
.
sudo apt update
sudo apt install mysql-server
During the installation process, you will be prompted to set a root password for MySQL. Make sure to choose a strong password and remember it, as you will need it later to access the MySQL server.
sudo systemctl start mysql sudo systemctl enable mysql
mysql -u root -p
Enter the root password you set during the installation, and you should be able to log in to the MySQL console.