在 /etc/yum.repos.d/ 目录下创建配置文件 MariaDB.repo
touch MariaDB.repo
[mariadb]
name = MariaDB
baseurl = https://mirrors.aliyun.com/mariadb/yum/10.5/centos8-amd64/
module_hotfixes=1
gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB
gpgcheck=1
sudo yum -y install MariaDB-client MariaDB-server