How to install MySQL server on Ubuntu 20.04 LTS Linux

ht‮pt‬s://www.lautturi.com
How to install MySQL server on Ubuntu 20.04 LTS Linux

To install MySQL Server on Ubuntu 20.04 LTS, you can use the following steps:

  1. Install the MySQL repository package:
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.

  1. Update the package index:
sudo apt update
  1. Install MySQL Server:
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.

  1. Start the MySQL service and enable it to start automatically on boot:
sudo systemctl start mysql
sudo systemctl enable mysql
  1. Test the installation:
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.

Created Time:2017-10-28 21:39:04  Author:lautturi