這篇文章主要介紹了Centos7.2下使用YUM快速安裝#MySQL#5.7的方法,需要的朋友可以參考下
卸載系統自帶mariadb資料庫
# rpm -qa| grep mariadb # rpm -e --nodeps mariadb-libs-5.5.44-2.el7.centos.x86_64
下載YUM庫
# rpm wgethttp://dev.MySQL.com/get/mysql57-community-release-el7-7.noarch.rpm
安裝YUM庫
# rpm yum localinstall -ymysql57-community-release-el7-7.noarch.rpm
安裝資料庫
# rpm yum install -y mysql-community-server
啟動MySQL服務
##
# rpm systemctl start mysqld.service
#
# mysql -uroot -p
mysql > alter user 'root'@'localhost' identified by '密码';
mysql > grant all privileges on *.* to 'root'@'%' identifiedby '密码' with grant option; mysql > flush privileges;
mysql > grant all privileges on *.* to 'root'@'192.168.1.1' identified by '密码' with grant option; mysql > flush privileges;
# firewall-cmd --add-port=3306/tcp
以上是Centos7.2下如何使用YUM來快速安裝MySQL5.7的方法介紹的詳細內容。更多資訊請關注PHP中文網其他相關文章!