MariaDB 11.3 to 11.4 - Upgrade Process on Linux



Published on 2024-10-01
Summary:

Upgrading MariaDB 11.3 to 11.4 on Debian 12 / Ubuntu 24.04

To start, update your package index and upgrade your system:


sudo apt update
sudo apt upgrade

Next, modify the repository configuration. For example, edit the file /etc/apt/sources.list.d/mariadb.list:


sudo nano /etc/apt/sources.list.d/mariadb.list

And in this file put:

On Debian 12 (Bookworm):


deb [arch=amd64 signed-by=/etc/apt/keyrings/mariadb-keyring.pgp] https://deb.mariadb.org/11.4/debian bookworm main

MariaDB documentation: Documentation - Install MariaDB 11.4 on Debian 12

On Ubuntu 24.04 (Noble Numbat):


deb [arch=amd64 signed-by=/etc/apt/keyrings/mariadb-keyring.pgp] https://mirror.mva-n.net/mariadb/repo/11.4/ubuntu noble main

MariaDB documentation: Documentation - Install MariaDB 11.4 on Ubuntu 24.04

Save and exit.

Stop the MariaDB service before proceeding:


sudo service mysql stop

Uninstall the previous version of MariaDB by removing only the mariadb-server package. There's no need to remove other packages:


sudo apt remove mariadb-server

Update the package index again:


sudo apt update

Install the new MariaDB version:


sudo apt install mariadb-server galera-4 mariadb-client libmariadb3 mariadb-backup mariadb-common

Reload systemd units with systemctl daemon-reload:


sudo systemctl daemon-reload

Now, update and upgrade your system one last time:


sudo apt update
sudo apt upgrade

Clean up unnecessary packages:


sudo apt autoremove
sudo apt autoclean

If needed, adjust any configuration options in the my.cnf file, particularly removing options that are no longer supported.

Start the MariaDB service:


sudo service mysql start

Run the mysql_upgrade command to ensure the system is properly upgraded:


sudo mysql_upgrade

Then check the new MariaDB version:


mariadb --version


Additional Resources

MariaDB documentation:

MariaDB documentation - Upgrading from MariaDB 11.3 to MariaDB 11.4