Visit the following link and choose the desired version of MariaDB,
https://downloads.mariadb.org/
Following commands will add repository and install MariaDB 10.3,
sudo apt-get install software-properties-common
sudo apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 0xF1656F24C74CD1D8
sudo add-apt-repository 'deb [arch=amd64,arm64,ppc64el] http://mirrors.tuna.tsinghua.edu.cn/mariadb/repo/10.3/ubuntu bionic main'
sudo apt update
sudo apt install mariadb-server
https://downloads.mariadb.org/
Following commands will add repository and install MariaDB 10.3,
sudo apt-get install software-properties-common
sudo apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 0xF1656F24C74CD1D8
sudo add-apt-repository 'deb [arch=amd64,arm64,ppc64el] http://mirrors.tuna.tsinghua.edu.cn/mariadb/repo/10.3/ubuntu bionic main'
sudo apt update
sudo apt install mariadb-server