
Doing Something With a Server: Installing MariaDB
- Written by John
- Jan 7th, 2019
Now that we have a web server we need to install an SQL server. There are many choices out there; MySQL from Oracle, MariaDB is driven by the community or Microsoft SQL server. My personal preference is MariaDB. Let’s go and install that.
Installing MariaDB
Since we’ve already setup the repo for MariaDB, all we need to do is install it.
sudo yum install mariadb-server
Once installed set MariaDB to start on boot and start MariaDB
sudo chkconfig mariadb on
sudo systemctl start mariadb
Now we have MariaDB running we need to secure MariaDB. This is to ensure the default config is not left configured.
sudo mysql_secure_installation
- login as root – enter a blank password
- set root password – press ‘Y’ and enter, then set a secure password
- remove anonymous users – press ‘Y’ and enter
- disallow root login remotely – press ‘Y’ and enter
- remove test database and access to it – press ‘Y’ and enter
- reload privilege tables now – press ‘Y’ and enter
Administering MariaDB
There are a few ways to administrate MariaDB or an SQL server. You can use the CLI, phpMyAdmin or my favourite way Webmin. I personally use Webmin as it allows you to manage the whole operating system and most Linux applications. It is a web application so you are not required to log into your server to maintain a lot of your operating system and applications.
If you would like to know more about MariaDB go to the MariaDB Administration page. We will be installing Webmin and glancing over it in the next article.