This article mainly introduces how to quickly install MySQL5.7 using YUM under Centos7.2. Friends who need it can refer to it
Uninstall the mariadb database that comes with the system
##
# rpm -qa| grep mariadb # rpm -e --nodeps mariadb-libs-5.5.44-2.el7.centos.x86_64
# rpm wgethttp://dev.MySQL.com/get/mysql57-community-release-el7-7.noarch.rpm
# rpm yum localinstall -ymysql57-community-release-el7-7.noarch.rpm
# rpm yum install -y mysql-community-server
# rpm systemctl start mysqld.service
Search for the password keyword to find the password, log in to mysql
# 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
The above is the detailed content of An introduction to how to use YUM to quickly install MySQL5.7 under Centos7.2. For more information, please follow other related articles on the PHP Chinese website!