Tutorials 3.0 Help

3. Install MariaDB Server

MariaDB is a popular database server, used in many environments. The installation is simple and requires just a few steps as shown.

dnf install mariadb-server mariadb

Once the installation is complete, enable MariaDB (to start automatically upon system boot), start the web server and verify the status using the commands below.

systemctl enable mariadb systemctl start mariadb systemctl status mariadb

Finally, you will want to secure your MariaDB installation by issuing the following command.

mysql_secure_installation

You will be asked a few different questions regarding your MariaDB installation and how you would like to secure it. You can change the database root user password, disable the test database, disable anonymous users, and disable root login remotely.

Here is an example:

image3.png

Once secured, you can connect to MySQL and review the existing databases on your database server by using the following command.

mysql -e "SHOW DATABASES;" -p
mariadb4.png
Last modified: 03 December 2024