Guides 11792 Published by

These concise steps let you install MariaDB 10.9 on a fresh Debian 11 Bullseye system in minutes by adding the MariaDB repository and key before updating APT. The official Bullseye repo only ships MariaDB 10.3, so fetching the signing key from mariadb.org guarantees package integrity and avoids InnoDB incompatibilities that plagued older upgrades. After creating a dedicated list file for the 10.9 repo, running apt‑get update and installing mariadb-server pulls the correct package, and you can confirm it with mysql -u root -p -e "SELECT VERSION();" which should return something like 10.9.x-1~bullseye. Finally, lock down defaults with mysql_secure_installation, consider setting up daily backups, and watch for common pitfalls such as missing keys or stale cached packages that could prevent the service from starting.



Installing MariaDB 10.9 on Debian 11 Bullseye

The following steps get the latest stable MariaDB 10.9 up and running on a fresh Bullseye system in under ten minutes—no extra hassle, no legacy packages.

Why the default repository isn’t enough

Debian 11’s official repo only offers MariaDB 10.3 at this time. A user who tried to upgrade from that version reported that InnoDB tables created with 10.3 were incompatible after a kernel upgrade, causing service failures. Installing directly from MariaDB’s own repository guarantees the newest bug fixes and performance improvements.

Adding the MariaDB signing key
sudo apt-get update && sudo apt-get install gnupg
sudo apt-key adv --fetch-keys https://mariadb.org/mariadb_release_signing_key.asc

The key lets the package manager verify that the downloaded packages really come from MariaDB, preventing man‑in‑the‑middle tampering.

Setting up the repository file
echo "deb [arch=amd64] https://mirrors.advancedhost.com/mariadb/repo/10.9/debian bullseye main" | sudo tee /etc/apt/sources.list.d/mariadb-10.9.list

Using a dedicated `.list` file keeps the system tidy; Debian will treat it like any other source during updates.

Updating apt and installing
sudo apt-get update
sudo apt-get install mariadb-server

Running `apt-get update` after adding the repo pulls in the 10.9 metadata, ensuring `mariadb-server` resolves to the correct package rather than the older one.

Verifying the version
mysql -u root -p -e "SELECT VERSION();"

The output should read something like `10.9.x-1~bullseye`. If it shows 10.3, the repo file was not sourced correctly.

Post‑install tweaks

Run the security script to lock down default accounts:

sudo mysql_secure_installation

This step removes anonymous users and disallows remote root access—best practice for any production host.

Enable automatic backups if desired: configure a simple cron job that runs `mysqldump` daily.

Common pitfalls
  • Key missing: If `apt-get update` complains about an unsigned repository, double‑check the key fetch line; network blocks sometimes drop the signature file.
  • Old package cached: A stale 10.3 package may linger in `/var/cache/apt/archives`. Clearing the cache (`sudo apt-get clean`) forces a fresh download.
  • Service not starting: Verify that no older MariaDB processes are still running (`ps aux | grep mysqld`). Kill lingering ones before restarting.

Once those steps are done, MariaDB 10.9 should be humming along nicely on Debian 11 Bullseye.