CentOS 7 安裝 MariaDB 10.5
- 安裝環境 : CentOS Linux release 7.9.2009 (Core)
安裝程序
- 建立 Yum Repo
vi /etc/yum.repos.d/MariaDB.repo
# MariaDB 10.5 CentOS repository list - created 2021-06-13 09:08 UTC # http://downloads.mariadb.org/mariadb/repositories/ [mariadb] name = MariaDB baseurl = http://yum.mariadb.org/10.5/centos7-amd64 gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB gpgcheck=1
- 安裝 MariaDB Server 與 Client
yum install MariaDB-server MariaDB-client
- 初始化設定
systemctl start mariadb systemctl enable mariadb mysql_upgrade mysql_secure_installation mysql -u root -p
- 執行 mysql_secure_installation 出現以下錯誤訊息
ERROR 1146 (42S02) at line 1: Table 'mysql.global_priv' doesn't exist
- 解決方式: 移除, 重開機, 重裝一次
sudo systemctl stop mariadb sudo yum remove mariadb sync;sync;sync;reboot