How to install & configure MySQL in Ubuntu 20.04 LTS!
Image Courtesy : www.mysql.com
1. Step - 1 : Login as Superuser -
sudo su
Enter system password
2. Step - 2 : Update your system -
apt-get update
3. Step - 3 : Install MySQL server -
apt install mysql-server
4. Step - 4 : Configure MySQL -
sudo mysql_secure_installation
Now set password for MySQL root user.
Next, enter it again to confirm the previous entered password.
It will prompt some questions as mentioned below -
a) Do you wish to continue with the password provided? [Y/n]
Give answer y
b) Remove anonymous users? [Y/n]
Give answer y
c) Disallow root login remotely? [Y/n]
Give answer y
d) Remove test database and access to it? [Y/n]
Give answer y
e) Reload privilege tables now? [Y/n]
Give answer y
It will securely configure MySQL in your system.
5. Step - 5 : Log in MySQL -
mysql -u root -p
Enter MySQL root password provided earlier.
6. Step - 6 : Check MySQL Version -
mysql --version
7. Step - 7 : Log out MySQL -
Exit;
No comments: