下载MySQL

wget https://dev.mysql.com/get/mysql80-community-release-el7-3.noarch.rpm

安装MySQL

rpm -ivh mysql80-community-release-el7-3.noarch.rpm

yum install mysql-server

如果报错,则可以使用如下命令

yum install mysql-server --nobest

启动MySQL

systemctl start mysqld

设置MySQL

默认是空密码

ALTER USER 'root'@'localhost' IDENTIFIED BY '12345678';

Q.E.D.


热爱生活,热爱程序