Here are the commands to run to install MariaDB 10.2 from the MariaDB repository on your Ubuntu system:

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.neusoft.edu.cn/mariadb/repo/10.2/ubuntu bionic main'

 

Once the key is imported and the repository added you can install MariaDB 10.2 from the MariaDB repository with:

sudo apt update
sudo apt install mariadb-server

 

 

reference documents

https://downloads.mariadb.org/mariadb/repositories/#mirror=neusoft&distro=Ubuntu&distro_release=bionic--ubuntu_bionic&version=10.2

https://tecadmin.net/install-mariadb-10-on-ubuntu/