MariaDB is a popular open-source database management system that is widely used in web applications and other systems that require a high-performance and reliable database. In this article, we will look at how to install the latest version of MariaDB on Ubuntu 22.04.
The first step in installing MariaDB is to add the MariaDB repository to your system. This can be done by running the following commands in the terminal:
sudo apt-get install software-properties-common
sudo apt-key adv --fetch-keys '<https://mariadb.org/mariadb_release_signing_key.asc>'
sudo add-apt-repository 'deb [arch=amd64,arm64,ppc64el] <http://mariadb.mirror.liquidtelecom.com/repo/10.5/ubuntu> focal main'
Next, update your system’s package list by running the following command:
sudo apt-get update
Now you are ready to install MariaDB. This can be done by running the following command:
sudo apt-get install mariadb-server
During the installation process, you will be prompted to set a password for the MariaDB root user. Make sure to choose a strong password and remember it, as you will need it to administer the MariaDB server.
Once the installation is complete, you can start the MariaDB server by running the following command:
sudo systemctl start mariadb
To make sure that the MariaDB server starts automatically when your system boots up, you can enable it by running the following command:
sudo systemctl enable mariadb
At this point, MariaDB should be installed and running on your system. You can verify this by running the mysql
command, which will connect you to the MariaDB server as the root user. From here, you can create databases, users, and tables, and perform other tasks to manage your database.
In conclusion, installing MariaDB on Ubuntu 22.04 is a simple process that involves adding the MariaDB repository, updating the package list, and installing the MariaDB package. Once installed, you can use the mysql
command to connect to the MariaDB server and manage your databases.