-
从mysql官网下载yum源
https://dev.mysql.com/downloads/repo/yum/
或者直接用wget下载
wget https://dev.mysql.com/get/mysql80-community-release-el7-3.noarch.rpm
-
安装yum文件
rpm -ivh mysql80-community-release-el7-3.noarch.rpm
-
清除编译yum
yum clean all
yum makecache
-
查看已安装的mysql
yum repolist all | grep mysql
-
安装mysql服务
yum install mysql-community-server
-
mysql初始密码
cat /var/log/mysqld.log | grep password
-
mysql 启动等操作
systemctl start mysql.service //启动
systemctl stop mysql.service//停止
systemctl restart mysql.service//重启
systemctl enable mysql.service//开机自启
- THE END -
最后修改:2020年12月28日
非特殊说明,本博所有文章均为博主原创。
如若转载,请注明出处:https://www.95app.top/linux-centos7-yum%e5%ae%89%e8%a3%85mysql-8-2/