Securing MySQL by mysql_secure_installation. In this section, I will show how to secure MariaDB/MySQL
Securing MariaDB/Mysql:
To Securing MySQL run following command:
mysql_secure_installation
Q1: Enter current password for root (enter for none)
Ans: Don't need to add anything just press Enter
Q2: Change the root password? [Y/n]
Ans: Y and Press Enter
Press your new root password and reenter the root password
Q3: Remove anonymous users? [Y/n]
Ans: Y
Q4: Disallow root login remotely? [Y/n]
Ans: Y
Q5: Remove test database and access to it? [Y/n]
Ans: Y
Q6: Reload privilege tables now? [Y/n]
Ans: Y