Upgrade to MariaDB 10.6 from MariaDB 10.5



Published on 2021-10-15
Summary:

Upgrading from MariaDB 10.5 to MariaDB 10.6 - Debian 11 / Ubuntu 20.04

First, update the packages index and upgrade:


sudo apt-get update
sudo apt-get upgrade

Modify the repository configuration. Example with /etc/apt/sources.list.d/mariadb.list:


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

And in this file put:

On Debian 11 (Bullseye):


deb [arch=amd64] https://ftp.nluug.nl/db/mariadb/repo/10.6/debian bullseye main

MariaDB documentation: Documentation - Install MariaDB 10.6 on Debian 11

On Ubuntu 20.04 (Focal Fossa):


deb [arch=amd64] https://ftp.nluug.nl/db/mariadb/repo/10.6/ubuntu focal main

MariaDB documentation: Documentation - Install MariaDB 10.6 on Ubuntu 20.04

Stop MariaDB:


sudo service mysql stop

Uninstall the old version of MariaDB:

Remove only Mariadb-Server is enough (no need to remove the other packages Mariadb- *):


sudo apt-get remove mariadb-server

Uninstall the old version of MariaDB:

Remove only Mariadb-Server is enough (no need to remove the other packages Mariadb- *):


sudo apt-get remove mariadb-server

Update the packages index with this command line:


sudo apt-get update

Install the new version of MariaDB:


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

Then, update and upgrade:


sudo apt-get update
sudo apt-get upgrade

Then, make any desired changes to configuration options in option files, such as my.cnf (this includes removing any options that are no longer supported).

Start MariaDB:


sudo service mysql start

Run mysql_upgrade:


sudo mysql_upgrade

Then check the new MariaDB version:


mariadb --version


MariaDB documentation:

MariaDB documentation - Upgrading from MariaDB 10.5 to MariaDB 10.6