. . .

A Comprehensive Guide to Installing MariaDB on Ubuntu

Installing MariaDB on Ubuntu

Step 1: Update Package Lists

Just like with MySQL, start by updating your package lists:

#sudo apt update

Step 2: Install MariaDB Server

Install the MariaDB server package with the following command:

#sudo apt install mariadb-server

During the installation, you will be prompted to set a root password for MariaDB. Choose a strong password and remember it.

Step 3: Secure MariaDB Installation

MariaDB also provides a script to secure your installation. Run the following command:
sudo mysql_secure_installation

Follow the prompts to configure security options, similar to the MySQL setup.

Step 4: Start and Enable MariaDB

Start the MariaDB service and enable it to start on boot:

sudo systemctl start mariadb
sudo systemctl enable mariadb

MariaDB is now installed and running on your Ubuntu machine.