Choose a mirror close to your server to download from:
https://downloads.mariadb.org/mariadb/repositories/#
Here are the commands to install MariaDB 10.4 from the MariaDB repository:
1. DigitalOcean mirrors for Ubuntu 20.04 “focal”
Amsterdam
$ sudo apt-get install software-properties-common
$ sudo apt-key adv --fetch-keys 'https://mariadb.org/mariadb_release_signing_key.asc'
$ sudo add-apt-repository 'deb [arch=amd64,arm64,ppc64el] http://ams2.mirrors.digitalocean.com/mariadb/repo/10.4/ubuntu focal main'
Once the key is imported and the repository added you can install MariaDB 10.4 from the MariaDB repository with:
$ sudo apt update
$ sudo apt install mariadb-server
New York
$ sudo apt-get install software-properties-common
$ sudo apt-key adv --fetch-keys 'https://mariadb.org/mariadb_release_signing_key.asc'
$ sudo add-apt-repository 'deb [arch=amd64,arm64,ppc64el] http://nyc2.mirrors.digitalocean.com/mariadb/repo/10.4/ubuntu focal main'
Once the key is imported and the repository added you can install MariaDB 10.4 from the MariaDB repository with:
$ sudo apt update
$ sudo apt install mariadb-server
San Francisco
$ sudo apt-get install software-properties-common
$ sudo apt-key adv --fetch-keys 'https://mariadb.org/mariadb_release_signing_key.asc'
$ sudo add-apt-repository 'deb [arch=amd64,arm64,ppc64el] http://sfo1.mirrors.digitalocean.com/mariadb/repo/10.4/ubuntu focal main'
Once the key is imported and the repository added you can install MariaDB 10.4 from the MariaDB repository with:
$ sudo apt update
$ sudo apt install mariadb-server
2. DigitalOcean mirrors for Ubuntu 18.04 LTS “bionic”
New York
https://downloads.mariadb.org/mariadb/repositories/#mirror=digitalocean-nyc
$ sudo apt-get install software-properties-common
$ sudo apt-key adv --fetch-keys 'https://mariadb.org/mariadb_release_signing_key.asc'
$ sudo add-apt-repository 'deb [arch=amd64,arm64,ppc64el] http://nyc2.mirrors.digitalocean.com/mariadb/repo/10.4/ubuntu bionic main'
Once the key is imported and the repository added you can install MariaDB 10.4 from the MariaDB repository with:
$ sudo apt update
$ sudo apt install mariadb-server
Amsterdam
https://downloads.mariadb.org/mariadb/repositories/#mirror=digitalocean-ams
$ sudo apt-get install software-properties-common
$ sudo apt-key adv --fetch-keys 'https://mariadb.org/mariadb_release_signing_key.asc'
$ sudo add-apt-repository 'deb [arch=amd64,arm64,ppc64el] http://ams2.mirrors.digitalocean.com/mariadb/repo/10.4/ubuntu bionic main'
Once the key is imported and the repository added you can install MariaDB 10.4 from the MariaDB repository with:
$ sudo apt update
$ sudo apt install mariadb-server
San Francisco
https://downloads.mariadb.org/mariadb/repositories/#mirror=digitalocean-sfo
$ sudo apt-get install software-properties-common
$ sudo apt-key adv --fetch-keys 'https://mariadb.org/mariadb_release_signing_key.asc'
$ sudo add-apt-repository 'deb [arch=amd64,arm64,ppc64el] http://sfo1.mirrors.digitalocean.com/mariadb/repo/10.4/ubuntu bionic main'
Once the key is imported and the repository added you can install MariaDB 10.4 from the MariaDB repository with:
$ sudo apt update
$ sudo apt install mariadb-server
REFERENCES
https://downloads.mariadb.org/mariadb/repositories/#
https://phoenixnap.com/kb/how-to-install-mariadb-ubuntu