1、安装yum源
yum -y install http://dev.mysql.com/get/mysql57-community-release-el7-11.noarch.rpm
2、安装mysql
yum install mysql-community-server -y
3、启动服务
systemctl start mysqld.service
4、查看状态
systemctl status mysqld.service
5、初始化mysql密码
grep "password" /var/log/mysqld.log
mysql -uroot -p
原文地址:https://blog.51cto.com/mydbs/2456411
时间: 2024-10-31 11:40:46