Centos7 yum安装mysql5.7

wget -i -c http://dev.mysql.com/get/mysql57-community-release-el7-10.noarch.rpm
yum -y install mysql57-community-release-el7-10.noarch.rpm
yum -y install mysql-community-server

报错:The GPG keys listed for the "MySQL 5.7 Community Server" repository are already installed but they are not correct for this package.
Check that the correct key URLs are configured for this repository.
解决:

rpm --import https://repo.mysql.com/RPM-GPG-KEY-mysql-2022

重新安装

yum -y install mysql-community-server

启动MYSQL

systemctl start  mysqld

设置开机自启

systemctl enable mysqld

获取mysql默认密码

grep "password" /var/log/mysqld.log

修改密码

ALTER USER 'root'@'localhost' IDENTIFIED BY '密码';


标签:mysql
版权属于:瑶玲OvO 所有,转载请注明文章来源。

本文链接: https://linmy.cn/index.php/%E6%9C%8D%E5%8A%A1%E5%99%A8/85.html

赞 (1)

评论区

发表评论

字数
0
/200
31+41=?

已有 1 条评论

isres
读者

66666,技术非常好,老板更新太少了

回到顶部