Before getting started, make sure to follow our Initial Server Setup Guide for CentOS 8 guide:
Also, make sure that you have
Adding the MariaDB repository
In order to install the latest stable MariaDB Community server on RHEL 8 or CentOS 8, you need to first add the MariaDB repository to
To do so, you can use the following automation script provided by MariaDB:
- wget https://downloads.mariadb.com/MariaDB/mariadb_repo_setup
- Make the script executable:
- chmod +x mariadb_repo_setup
- sudo ./mariadb_repo_setup
With that, you are ready to install the latest stable MariaDB Community Server on your CentOS 8 server!
Installing the latest MariaDB version
With the MariaDB repository that we just added,
dnf will install the stable MariaDB version.
To avoid any unexpected problems, first install the required dependencies:
- sudo yum install perl-DBI libaio libsepol lsof boost-program-options
After that install MariaDB from the new repository that we just added by specifying it with the
- sudo yum install --repo="mariadb-main" MariaDB-server
After that make sure to start MariaDB:
- sudo systemctl start mariadb
And also make sure that the service is enabled so that it starts automatically in case of a server reboot:
- sudo systemctl enable mariadb
Finally, check if MariaDB is running:
- sudo systemctl status mariadb
With that you would have the latest MariaDB up and running!
Next make sure that you secure MariaDB as well!
In order to secure your MariaDB server, you just need to run the following command:
- sudo mysql_secure_installation
Finally to check your version run the following command:
- mysqladmin -u root -p version
This is pretty much it! Now you have the latest MariaDB version installed and up and running!
For more information on how to get started with MariaDB, make sure to check the steps from the following tutorial:
I hope that this helps!