
{{ $('Map tags to IDs').item.json.title }}
How to Install MariaDB
MariaDB is a popular open-source relational database management system that serves as a drop-in replacement for MySQL. It is designed to be highly compatible and offers enhanced performance and features. This tutorial will walk you through the installation of MariaDB on various Linux distributions.
1. Updating Your Package Index
Before installing any software, it’s a good practice to update your package index to ensure you have the latest version available. Open your terminal and run:
sudo apt update
For CentOS/RHEL, you would use:
sudo yum update
2. Installing MariaDB
To install MariaDB, use the appropriate command for your Linux distribution:
- For Ubuntu:
sudo apt install mariadb-server
- For CentOS:
sudo yum install mariadb-server
- For Fedora:
sudo dnf install mariadb-server
3. Starting the MariaDB Service
After installation, start the MariaDB service with:
sudo systemctl start mariadb
To ensure that MariaDB starts on boot, run:
sudo systemctl enable mariadb
4. Securing MariaDB Installation
Run the secure installation script to improve your installation’s security:
sudo mysql_secure_installation
This script will walk you through several steps to configure security settings, such as setting a root password, removing anonymous users, and disabling root login remotely.
5. Logging into MariaDB
To access the MariaDB shell, use the following command:
mysql -u root -p
Enter the root password you set during the secure installation.
6. Creating a Database
Now that you are logged in, you can create a database with:
CREATE DATABASE my_database;
Replace my_database
with your desired database name.
7. Conclusion
By following this tutorial, you have successfully installed and configured MariaDB on your Linux system. MariaDB serves as a reliable and powerful database management solution. Continue to explore its powerful features and commands to manage your databases effectively!