Upgrade MariaDB 10.3 to 10.5 on Ubuntu 20.04
Before upgrading, take a backup all databases.
mysqldump --routines --triggers --all-databases | gzip -9 > "$(date +%F-%H%m%S)"-mysql-backup.sql.gz
run these commands
sudo apt-get install apt-transport-https curl
sudo mkdir -p /etc/apt/keyrings
sudo curl -o /etc/apt/keyrings/mariadb-keyring.pgp 'https://mariadb.org/mariadb_release_signing_key.pgp'
Create file
vi /etc/apt/sources.list.d/mariadb.sources
and add the following content. If you need repo config for another version of MariaDB or download server from another country, you can do so at
https://mariadb.org/download/?t=repo-config&d=20.04+%22focal%22&v=10.5&r_m=rackspace
# MariaDB 10.5 repository list - created 2024-10-10 04:35 UTC
# https://mariadb.org/download/
X-Repolib-Name: MariaDB
Types: deb
# deb.mariadb.org is a dynamic mirror if your preferred mirror goes offline. See https://mariadb.org/mirrorbits/ for details.
# URIs: https://deb.mariadb.org/10.5/ubuntu
URIs: https://mirror.rackspace.com/mariadb/repo/10.5/ubuntu
Suites: focal
Components: main main/debug
Signed-By: /etc/apt/keyrings/mariadb-keyring.pgp
To update MariaDB to version 10.5, run
sudo apt-get update
sudo apt-get install mariadb-server
Back to MySQL