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 ...

Get Getting Started with MariaDB - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.