报这个错多半是没有安装成功在yum install mysql-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.
可以参考下面这个重新安装:
https://blog.csdn.net/Jaeger_Java/article/details/124425409
安装完成后成功启动mysqld服务
[root@izbp1fmrr626i67u1yj7dbz ~]# service mysqld start
Redirecting to /bin/systemctl start mysqld.service
[root@izbp1fmrr626i67u1yj7dbz ~]# netstat -anp
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 1641/nginx: master
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 1920/sshd
tcp 0 0 172.19.33.92:44406 100.100.45.106:443 TIME_WAIT -
tcp 0 48 172.19.33.92:22 27.38.77.221:54032 ESTABLISHED 7841/sshd: root@pts
tcp 0 0 172.19.33.92:22 27.38.77.221:54039 ESTABLISHED 7843/sshd: root@not
tcp 0 0 172.19.33.92:49358 100.100.30.25:80 ESTABLISHED 1384/AliYunDun
tcp6 0 0 :::3306 :::* LISTEN 8255/mysqld
udp 0 0 0.0.0.0:68 0.0.0.0:* 710/dhclient
udp 0 0 172.19.33.92:123 0.0.0.0:* 429/ntpd
udp 0 0 127.0.0.1:123 0.0.0.0:* 429/ntpd
udp 0 0 0.0.0.0:123 0.0.0.0:* 429/ntpd
udp6 0 0 :::123 :::* 429/ntpd
但是连接mysql的时候报错:
ERROR 1045 (28000): Access denied for user ‘root’@‘localhost’ (using password: YES)
参考下面的链接进行解决:
https://blog.csdn.net/qq_43674360/article/details/124758352