
MariaDB is an open-source relational database management system that works as a drop-in replacement for MySQL with improved reliability, performance, and flexibility. MariaDB uses the same SQL syntax as MySQL to enable the creation and management of databases on a server.
This article explains how to install MariaDB on Ubuntu 24.04. In addition, you will set up MariaDB with production configurations to enable the creation and management of databases on the server.
Before you begin:
MariaDB is available in the default APT repositories on Ubuntu 24.04. Follow the steps below to install the MariaDB Server package and verify the new system service details.
Install MariaDB.
View the installed MariaDB version on your server.
Output:
Enable the MariaDB system service to start at boot time.
Start MariaDB on your server.
View the MariaDB service status to verify that it's running on your server.
Output:
MariaDB runs with the default root user account without a default password on your server. As a result, only privileged users can access the MariaDB server to create and manage databases. Follow the steps below to secure the MariaDB server with root password, remove anonymous users and disable remote access for the root user.
Run the following command to start the MariaDB security script.
none as the current root password.unix_socket authentication.MariaDB is compatible with graphical management interfaces such as PhpMyAdmin that integrate directly with the database server console. You can access the MariaDB database server console using the mariadb command or mysql. Follow the steps below to access the MariaDB console and create sample databases on the server.
Log in to the MariaDB database server.
Enter the database root user password you set earlier when prompted.
Create a new sample database. For example, exampledb.
View all databases on the server and verify that the new database is available.
Output:
Create a new database user with a strong password. For example, exampledb_user.
Grant the user full privileges to the exampledb database.
Refresh the MariaDB privilege tables to apply the new database changes.
You have installed and configured MariaDB on a Ubuntu 24.04 server. You can integrate the database server with your existing applications to use MariaDB as the backend. For more information and configuration options, please visit the official MariaDB documentation.
0 Comments
Be the first to comment and share your perspective with the community.