Securing MariaDB in 10 seconds
The first thing that we need to do after installing MariaDB is to run the mysql_secure_installation
script. This useful tool is included with MariaDB, and it's found among the other tools and binaries that ship with MariaDB. Its sole purpose is to quickly and easily set up some basic security. To run it, open a command line and enter the following command:
mysql_secure_installation
The script will ask several questions. For nearly all of them, it's best to answer yes (y
). The only question that we might want to answer no (n
) to is when the script asks us to set a root user password. If we've already set a root password, we can safely skip this question (the script is helpful enough to tell us when it is safe to say no).
The other questions include removing the test database, removing the default anonymous user, and disallowing remote root user logins. The anonymous user and test database are included in the default MariaDB installation for testing...