Welcome to our guide on how to install MariaDB 10.3 on Fedora 30. MariaDB is an open-source relational database which comes as an enhanced drop-in replacement for the famous MySQL. It is fast, robust and scalable with a rich ecosystem of storage engines, plugins etc making it very versatile for most use cases.
Install MariaDB 10.3 on Fedora 30
MariaDB 10.3 is the current stable release with MariaDb 10.4 being the latest release development version. Fedora 30 repos contains this current stable version of MariaDB and thus, you can simply install it via the DNF package manager.
dnf install mariadb mariadb-server
Dependencies resolved. ======================================================================================================================================================= Package Architecture Version Repository Size ======================================================================================================================================================= Installing: mariadb x86_64 3:10.3.12-10.fc30 fedora 6.0 M mariadb-server x86_64 3:10.3.12-10.fc30 fedora 17 M ...
Running MariaDB on Fedora 30
Once the installation is done, you can run by executing the command below;
systemctl start mariadb
To configure MariaDB to run on system boot;
systemctl enable mariadb
Initial MariaDB security
The install of MariaDB comes with a security script called mysql_secure_installation. This script is used to perform initial MariaDB security including setting up root password, remove default test databases, disabling root remote login, removing anonymous database users. This can be done by running the command below;
Set MariaDB root Password
When the script above runs, it first prompts you for the current root password. But since you just did the installation and no password set yet, press Enter to accept blank password. You will then be prompted to set root password.
... Enter current password for root (enter for none): OK, successfully used password, moving on... Setting the root password ensures that nobody can log into the MariaDB root user without the proper authorisation. Set root password? [Y/n] y New password: StrongPassWORD Re-enter new password: StrongPassWORD ...
Remove MariaDB anonymous user
By default, MariaDB usually has an anonymous user for testing purposes. Remove this user.
Remove anonymous users? [Y/n] y ... Success!
Disable Remote root Login
When prompted to disable remote root login to MariaDB, accept and proceed.
Disallow root login remotely? [Y/n] y ... Success!
Remove MariaDB test Database
Remove test database and the privileges associated with it.
Remove test database and access to it? [Y/n] y - Dropping test database... ... Success! - Removing privileges on test database... ... Success!
Reload the Privilege Tables
Reload the privilege tables to effect all the changes that have been made above.
Reload privilege tables now? [Y/n] y ... Success!
That is, you MariaDB on Fedora 30 is installed and setup.
Since you have disabled remote login for root user, you can test local connection as shown below;
mysql -u root -p Enter password: StrongPassWORD Welcome to the MariaDB monitor. Commands end with ; or \g. Your MariaDB connection id is 16 Server version: 10.3.12-MariaDB MariaDB Server Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. MariaDB [(none)]>
As you can see above, MariaDB version we are running is 10.3.
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 16
Server version: 10.3.12-MariaDB MariaDB Server
You can also check the version by logging to MariaDB as in above and running the query;
MariaDB [(none)]> select version(); +-----------------+ | version() | +-----------------+ | 10.3.12-MariaDB | +-----------------+ 1 row in set (0.002 sec)
That is all about how to install MariaDB 10.3 on Fedora 30. Enjoy.
You can also check out previous articles on Fedora 30/29/28;