Securing MySQL by mysql_secure_installation

Author: Al-mamun Sarkar Date: 2020-04-14 09:25:20

Securing MySQL by mysql_secure_installation. In this section, I will show how to secure MariaDB/MySQL 

Securing MariaDB/Mysql:

  • Set a Mysql Root Password
  • Disable remote connection for the root account fo MariaDB
  • Remove anonymous Accounts of MariaDB

 

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: