Menu

How to Install MariaDB 12.3 LTS on Ubuntu 26.04

Install MariaDB 12.3 LTS on Ubuntu 26.04 from MariaDB’s APT repository, verify the server, and create a local application database.

Posted on By
On this page

MariaDB 12.3 is a stable Long-Term Support (LTS) release maintained until June 2029. Ubuntu 26.04 uses the codename resolute, which MariaDB’s repository setup script supports. This guide configures that repository for the 12.3 series, verifies the setup script before running it, and checks the installed server. See the Ubuntu release list, the MariaDB 12.3 release notes, and MariaDB’s repository setup instructions.

These steps assume a fresh installation. If the machine already contains MariaDB or MySQL databases, make and verify a backup before changing package sources, then follow the appropriate upgrade or migration procedure.

Prerequisites

  • Ubuntu 26.04 LTS with internet access.
  • A user account with sudo privileges.
  • A new MariaDB installation, or a verified backup and upgrade plan for any existing database.

Add MariaDB’s APT Repository

MariaDB’s repository setup script configures the APT source, imports the signing key, and refreshes APT’s package index. The script defaults to its latest GA series, so the command below explicitly selects mariadb-12.3.

Install the prerequisites and download the setup script:

sudo apt update
sudo apt install -y ca-certificates curl
curl -fsSLO https://r.mariadb.com/downloads/mariadb_repo_setup

Verify the script checksum before running it. The SHA-256 below matches MariaDB’s published script version from September 15, 2026. If the official repository setup page lists a newer script, use its corresponding checksum instead.

echo "b54c87edfe81b9837ef44a4a4f39383dd8df32776e6a18c0743a5d3ece044ac3  mariadb_repo_setup" | sha256sum -c -

Configure the repository for Ubuntu 26.04 and MariaDB 12.3:

sudo bash ./mariadb_repo_setup \
  --os-type=ubuntu \
  --os-version=resolute \
  --mariadb-server-version=mariadb-12.3 \
  --skip-maxscale \
  --skip-tools

The --skip-maxscale and --skip-tools options leave out the separate MaxScale and tools repositories, which are not needed for a standalone MariaDB server. The repository setup script refreshes APT’s package index after adding the source.

Install MariaDB Server

Install MariaDB Server:

sudo apt install -y mariadb-server

Check the client package version:

mariadb --version

This command reports the client version. Use a query against the running server, as shown below, to verify the server version.

Verify the Service

Check that systemd reports MariaDB as active:

sudo systemctl status mariadb --no-pager

Run a query as the local administrative account:

sudo mariadb --execute='SELECT VERSION();'

The query returns the server version. The MariaDB 12.3 APT repository currently provides the 12.3.3 stable release for Ubuntu 26.04; the patch version may change as MariaDB publishes maintenance updates.

Create a Database and Application User

Open the MariaDB client as the local administrator:

sudo mariadb

On a standard Linux installation, MariaDB uses unix_socket authentication for the local root account by default. Running the client with sudo lets the operating-system root account connect without a separate MariaDB password; see the MariaDB Unix socket authentication documentation.

Create a database and a local-only application account. Replace the example password with a long, unique password:

CREATE DATABASE appdb CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
CREATE USER 'appuser'@'localhost' IDENTIFIED BY 'replace-with-a-long-unique-password';
GRANT ALL PRIVILEGES ON appdb.* TO 'appuser'@'localhost';
\q

Test the new account; MariaDB prompts for its password:

mariadb --user=appuser --password --database=appdb --execute='SELECT DATABASE();'

The account is limited to connections from the same machine. For an application on another host, use a deliberately scoped host rule and configure server network access and the firewall for the intended clients.

Manage the MariaDB Service

Use systemctl to check, start, stop, or restart MariaDB:

sudo systemctl status mariadb --no-pager
sudo systemctl start mariadb
sudo systemctl stop mariadb
sudo systemctl restart mariadb

The package normally starts the service after installation. Enable it at boot if needed:

sudo systemctl enable mariadb

Conclusion

You installed MariaDB 12.3 LTS on Ubuntu 26.04 from MariaDB’s APT repository, verified the server, and created a database with a local application user. For Debian 13 (Trixie), see our MariaDB 12.3 installation guide. For Ubuntu 22.04, see our MariaDB installation guide. For more MariaDB material, browse our MariaDB Reference.