5

I have had MariaDB installed on my server for a while now. I previously used sudo apt install mariadb-server to install.

I wish to upgrade this to 10.6.11 as this is the newest stable LTS version, but the Ubuntu distro only has 10.6.7 and won't allow me to upgrade using apt upgrade mariadb-server.

I have tried removing the server using apt remove mariadb-server, then adding the repo:

sudo add-apt-repository 'deb [arch=amd64,arm64,ppc64el] https://mariadb.mirror.liquidtelecom.com/repo/10.6/ubuntu focal main'

... then installing, but it's a big ole mess. Even after the apt remove, the server was still there. I did an apt purge and got rid of it, but when i try an apt install mariadb-server, I get the following error:

The following packages have unmet dependencies: lists mariabd-server

And then quits. Obviously, I don't know what I'm doing.

I'd appreciate a step-by-step how to upgrade MariaDB beyond what's natively available in the Ubuntu distro.

Clint
  • 186

1 Answers1

5

There are 2 ways of installing MariaDB on Ubuntu 22.04 - from the Universe repo, or from the MariaDB repo.

1. Via Universe repo

The Ubuntu Universe team has updated mariadb to 10.6.11. Make sure the following lines are uncommented in /etc/apt/sources.list:

deb http://archive.ubuntu.com/ubuntu jammy universe
deb http://archive.ubuntu.com/ubuntu jammy-updates universe
deb http://archive.ubuntu.com/ubuntu jammy-security universe

Then run sudo apt install mariadb-server. Note that the Universe repo might be slower to implement security patches than the MariaDB repo - so some months may pass before an update hits this repo.

2. Via MariaDB official repo

Customize your repo configuration this page.

With the following selected:

  • Distribution: 22.04 (Jammy)
  • MariaDB version: 10.6
  • Mirror: LiquidTelecom (Nairobi)

Run the following to add the repo:

sudo apt-get install apt-transport-https curl
sudo curl -o /etc/apt/trusted.gpg.d/mariadb_release_signing_key.asc 'https://mariadb.org/mariadb_release_signing_key.asc'
sudo sh -c "echo 'deb https://mariadb.mirror.liquidtelecom.com/repo/10.6/ubuntu jammy main' >>/etc/apt/sources.list"

Now you can run the following to install the latest version:

sudo apt update
sudo apt install mariadb-server

This version will likely be patched more often than the Universe provided version.

It should also be possible to add the MariaDB repo, and then run sudo apt upgrade to switch over to any newer version in the MariaDB repos.

Artur Meinild
  • 26,018