How to Install MariaDB on Ubuntu 24.04 – Step-by-Step Installation Guide
Learn how to install MariaDB on Ubuntu 24.04 easily. Follow a clear, step-by-step process to set up MariaDB, secure your installation, and start using it for database management on your Ubuntu system.
Ad

MariaDB is an open-source relational database management system that serves as a strong alternative to MySQL. It is known for its performance, reliability, and ease of use. If you are setting up a new server or need a robust database system for your applications, learning how to install MariaDB on Ubuntu is essential.

Before starting the installation, ensure your Ubuntu 24.04 system is up to date. Open the terminal and update your package list by running:

sudo apt update
sudo apt upgrade

Once the update is complete, install the MariaDB server package using the following command:

sudo apt install mariadb-server -y

This command downloads and installs the latest stable version of MariaDB available in the Ubuntu repository. After the installation, the service starts automatically. To verify the installation, check the status of the MariaDB service:

sudo systemctl status mariadb

If it is active and running, your database server is successfully installed. You can also enable it to start automatically after every system reboot:

sudo systemctl enable mariadb

For security reasons, it’s important to run the initial configuration script provided by MariaDB. This helps you remove anonymous users, disable remote root login, and set a root password. Use the following command to start the secure installation setup:

sudo mysql_secure_installation

The setup will guide you through several security-related prompts. It is recommended to answer “Y” (yes) to all options to ensure a safe configuration.

Once the setup is complete, you can test the installation by logging into the MariaDB shell:

sudo mysql -u root -p

After entering the root password you set during the secure installation, you will access the MariaDB console where you can start creating databases, users, and tables.

MariaDB works well with most web applications such as WordPress, Drupal, and Joomla. It’s also a preferred choice for developers who want an open-source database compatible with MySQL syntax but with improved performance and features.

Keeping your database updated is equally important. You can upgrade MariaDB to the latest version anytime using:

sudo apt update
sudo apt upgrade mariadb-server

For detailed steps and additional configurations, you can refer to the official guide: https://docs.vultr.com/how-to-install-mariadb-on-ubuntu-24-04

 

Installing MariaDB on Ubuntu 24.04 is straightforward when you follow the right steps. With the system properly set up and secured, you are ready to manage your databases efficiently and support your applications with a reliable backend solution.

disclaimer

Comments

https://sharefolks.com/assets/images/user-avatar-s.jpg

0 comment

Write the first comment for this!