1、Adding the MySQL Yum Repository;
rpm -Uvh mysql80-community-release-el7-3.noarch.rpm
2、Selecting a Release Series
修配置文件
vi /etc/yum.repos.d/mysql-community.repo
57 enabled改成1
80 enabled改成0
3、Installing MySQL
yum -y install mysql-community-server
4、Starting the MySQL Server
systemctl start mysqld.service
systemctl status mysqld.service
5、利用临时密码登录并修改密码
//查看临时密码
grep 'temporary password' /var/log/mysqld.log
//利用临时密码登录
mysql -uroot -p
//修改临时密码
ALTER USER 'root'@'localhost' IDENTIFIED BY 'My12345!';
6、开启远程连接
grant all privileges on *.* to root@'%' identified by "My12345!";
flush privileges;