If you are a developer, system administrator, or just someone who wants to set up a database server on your Scientific Linux machine, MariaDB is an excellent choice. MariaDB is a popular open-source relational database management system that is fully compatible with MySQL. It is fast, reliable, and easy to use. In this tutorial, we will show you how to install MariaDB on Scientific Linux. We will also go over some basic configurations to get you started.
Prerequisites
Before you begin, you should have the following:
- A running instance of Scientific Linux
- Access to the command line
- A user account with sudo privileges
How to Install MariaDB on Scientific Linux
Update the System
To update your system before installing any new packages, execute the following command, which is highly recommended for keeping your system up-to-date.
sudo yum update
Install MariaDB on Scientific Linux
Scientific Linux includes MariaDB in its official repositories. To install it, run the following command:
sudo yum install mariadb-server mariadb
This will install the MariaDB server and client packages.
Start and Enable the MariaDB Service on Scientific Linux
Once the installation is complete, you can start and enable the MariaDB service with the following commands:
sudo systemctl start mariadb
sudo systemctl enable mariadb
This will start the MariaDB service and ensure that it starts automatically on boot.
Secure the MariaDB Installation on Scientific Linux
By default, MariaDB installation comes with some insecure default settings. We can secure our installation by running a script provided by MariaDB. Run the following command to start the script:
sudo mysql_secure_installation
You will be prompted with a series of questions. The first question will ask you to set the root password for the MariaDB server. Make sure to choose a strong password and remember it. You will need it to access the MariaDB server.
The script will also prompt you to remove the anonymous user, disable remote root login, and remove the test database. Answer each question with Y (yes) or N (no) accordingly.
Verify the Installation on Scientific Linux
To verify that MariaDB is running and accepting connections, you can connect to the MariaDB server using the following command:
sudo mysql -u root -p
After setting the root password earlier, the system will prompt you to enter it. Upon successful authentication, the MariaDB shell prompt will appear, allowing you to start using the database management system.
Conclusion
In this tutorial, we showed you how to install MariaDB on Scientific Linux. We also went over some basic configurations to get you started. With MariaDB, you can easily set up a database server on your Scientific Linux machine and start building your applications. We hope this tutorial was helpful. Learn How to Install PostgreSQL on Scientific Linux and How to Install MySQL on Scientific Linux