mysql启动报错Redirecting to systemctl start mysqld.serviceFailed to start mysqld.service:Unit not found.

报这个错多半是没有安装成功在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

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值