Hi @erdiritru,
I did it a couple of hours ago in two machines. I’m using Debian 12 but it should work the same way for Ubuntu.
Warning: Use this procedure at your own risk.
1.- Backup MariaDB dbs and conf. If you want to use it, I made a little script to dump and compress all dbs in /var/lib/backup_mariadb/$DATE/
and copy /etc/mysql/
to /var/lib/backup_mariadb/$DATE/etc/mysql/
curl -fsSLm10 https://7j.gg/bckmar | sudo bash -s --
2.- Stop MariaDB:
systemctl stop mariadb
3.- MariaDB recommends to remove the packages before upgrading but it is not strictly necessary so you could skip this step.
apt remove mariadb-client mariadb-server
apt autoremove -y
Important: don’t miss to execute apt autoremove -y
4.- Edit apt file /etc/apt/sources.list.d/mariadb.list
to use the right version, I was using Debian 12 and MariaDB 10.11 so in my case the file should look like:
Note: I’ll use MariaDB 11.4 because it’s an LTS (Long Term Support) release.
deb [arch=amd64 signed-by=/usr/share/keyrings/mariadb-keyring.gpg] https://dlm.mariadb.com/repo/mariadb-server/11.4/repo/debian bookworm main
As you are using Ubuntu 22.04, it should look like:
deb [arch=amd64 signed-by=/usr/share/keyrings/mariadb-keyring.gpg] https://dlm.mariadb.com/repo/mariadb-server/11.4/repo/ubuntu jammy main
If you didn’t install the key, you can install it:
curl -fsSL https://mariadb.org/mariadb_release_signing_key.asc | gpg --dearmor | sudo tee /usr/share/keyrings/mariadb-keyring.gpg > /dev/null
5.- Update repos and install MariaDB (below commands will upgrade packages like mariadb-common mysql-common libmariadb3 and will install additional packages like galera-4, mariadb-server-core, etc.)
If you skipped step 3:
apt update
apt full-upgrade
If you followed step 3:
apt update
apt install mariadb-client mariadb-client-compat mariadb-server mariadb-server-compat -y
Once all packages are installed, MariaDB should be up and running:
systemctl status mariadb.service --no-pager -l
The current conf should be the same you had for MariaDB 10.11.