Upgrade to MariaDB 10.6 From MariaDB 10.5
Published on 2021-10-15
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
Save and exit.
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
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
Warning: The unit file, source configuration file or drop-ins of mariadb.service changed on disk. Run systemctl daemon-reload
to reload units:
sudo systemctl daemon-reload
Then, update and upgrade:
sudo apt-get update
sudo apt-get upgrade
Then, remove and clean:
sudo apt-get autoremove
sudo apt-get autoclean
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
Various Links
MariaDB documentation:
MariaDB documentation - Upgrading from MariaDB 10.5 to MariaDB 10.6