How to Install MariaDB 12.3 LTS on Debian 13
Install MariaDB 12.3 LTS on Debian 13 (Trixie) from MariaDB’s APT repository, verify the server, and create a local application database.
On this page
Debian 13 (Trixie) is the current Debian stable release. MariaDB 12.3 is a stable Long-Term Support (LTS) release maintained until June 2029. This guide configures MariaDB’s APT repository for the 12.3 series, verifies the repository script, and checks the server after installation. See the Debian release information, 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
- Debian 13 (Trixie) with internet access.
- A user account with
sudoprivileges. - 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 its 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 Debian 13 and MariaDB 12.3:
sudo bash ./mariadb_repo_setup \
--os-type=debian \
--os-version=trixie \
--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.
Install MariaDB Server
Refresh APT’s package index and check the server candidate:
sudo apt update
apt-cache policy mariadb-server
The candidate should come from MariaDB’s repository and use the 12.3 series. The Trixie repository currently lists MariaDB 12.3.3 packages for amd64 and arm64; the patch version may change as MariaDB publishes maintenance releases. See the Trixie 12.3 package index.
Install the server:
sudo apt install -y mariadb-server
Check the client package version:
mariadb --version
This command reports the client version. Query the running server to check its version.
Verify the Server
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();'
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 Application User
Open the MariaDB client as the local administrator:
sudo mariadb
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 Debian 13 from MariaDB’s APT repository, verified the server, and created a database with a local application user. For Ubuntu 26.04, see our MariaDB 12.3 installation guide. For Ubuntu 22.04, see our MariaDB installation guide. You can also browse our MariaDB Reference.