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 '密码';
66666,技术非常好,老板更新太少了