Setting up MariaDB for virtual domains and users
Since we have already installed MariaDB (the drop-in replacement for MySQL) during the postfix installation, we can proceed to the configuration. But if we ever needed to reinstall the package again, we can always use yum
:
$ sudo yum install mariadb-server
The first thing to do to start the MariaDB configuration is to start the service. Also, we need to add it to the system startup services:
$ sudo systemctl enable mariadb.service $ sudo systemctl start mariadb.service
Then we start the configuration by setting up the secure installation mode where we can set up or change the MariaDB root password, remove anonymous user accounts, disable root logins outside of the local host, and so on:
$ sudo mysql_secure_installation
We should make sure to answer yes at the end to finish the configuration.
Now we have the MariaDB service well configured and ready to be used. We will start setting up the new database to use it with Postfix. To add the new database...