方法1:注册repo
# 用超级拥护 root
apt-get install software-properties-common
apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 0xF1656F24C74CD1D8
add-apt-repository 'deb [arch=amd64,arm64,ppc64el] http://mirrors.tuna.tsinghua.edu.cn/mariadb/repo/10.4/ubuntu bionic main'
方法2:修改source
有#的是不用执行的哦
# add source key
curl -sS https://downloads.mariadb.com/MariaDB/mariadb_repo_setup | sudo bash
vim /etc/apt/sources.list
# add this
# MariaDB 10.4 repository list - created 2020-01-01 13:30 UTC
# http://downloads.mariadb.org/mariadb/repositories/
deb [arch=amd64,arm64,ppc64el] http://mirrors.tuna.tsinghua.edu.cn/mariadb/repo/10.4/ubuntu bionic main
deb-src http://mirrors.tuna.tsinghua.edu.cn/mariadb/repo/10.4/ubuntu bionic main
最后一步是安装MariaDB Server:
sudo apt-get update sudo apt-get install mariadb-server mariadb-client