MariaDB is an open-source, community-developed relational database management system. It maintains high compatibility with MySQL and is intended to be a drop-in replacement for it. Some of the original developers of MySQL are developers of this project.
In this article, I will discuss how to install and use MariaDB in Fedora Linux.
To follow this guide you should have the following –
- A system running Fedora Linux
- Access to a user account with superuser privileges.
How to install MariaDB in Fedora
MariaDB is available in the default repository of Fedora you can directly install it by using the dnf command in your terminal.
Before that make sure packages on your system are updated –
sudo dnf -y update
Next, use the given command to install MariaDB on Fedora –
sudo dnf -y install MariaDB-server
You can verify the installation by using –
Start and enable the MariaDB services –
sudo systemctl enable --now mariadb
sudo systemctl start mariadb
You can check the status of
mariadb-server by using –
sudo systemctl status mariadb
Securing MariaDB database
You can run the
mysql_secure_installation to secure MariaDB on your system. This is a security script that makes some less secure default options more secure for example the Validate Password Component is used to test the strength of the MySql password, you can disallow remote root login if you want.
Use the given command to run this script –
This will prompt you to choose the options if you want to allow the option press y and enter for yes otherwise type n and then press enter for no. Meanwhile, you will be asked to set the MariaDB database root user password. Choose the strength 0 for low 1 for medium 3 for strong password and then enter the password for root.
Once everything gets completed you will see the All Done message.
Connect to MariaDB database
To connect to the MariaDB database open your terminal and type the following command.
sudo mysql -u root -p
Type the root user password and press Enter.
Once authentication gets completed. Your prompt will change to MariaDB shell.
Now you can start executing MySQL commands for creating databases.
So you have successfully installed and configured MariaDB to your Fedora system.
To know more you can check its official documentation.
Now if you have a query then leave it in the comments below.