CentOS 移除舊版 MariaDB,安裝新版 MariaDB

Linux作業系統安裝、設定與管理 (CentOS、Ubuntu)
回覆文章
inho
文章: 38
註冊時間: 2017-12-08, 23:00

CentOS 移除舊版 MariaDB,安裝新版 MariaDB

文章 inho » 2018-03-08, 05:59

參考網站:
https://stackoverflow.com/questions/333 ... -or-rhel-7
=====================================================================================
These steps are working on CentOS 6.5 so they should work on CentOS 7 too:

1、 $ sudo yum remove mariadb mariadb-server
2、 $ sudo rm -rf /var/lib/mysql If your datadir in /etc/my.cnf points to a different directory, remove that directory instead of /var/lib/mysql
3、 $ sudo rm /etc/my.cnf
4、 Optional step: rm ~/.my.cnf
5、 $ sudo yum install mariadb mariadb-server
[EDIT] - Update for MariaDB 10.1 on CentOS 7

The steps above worked for CentOS 6.5 and MariaDB 10.

I've just installed MariaDB 10.1 on CentOS 7 and some of the steps are slightly different.

Step 1 would become:

$ sudo yum remove MariaDB-server MariaDB-client
Step 5 would become:

$ sudo yum install MariaDB-server MariaDB-client
The other steps remain the same.

回覆文章