參考網站:
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.