linux下centos安装mysql后无法启动
[root@VM-4-17-centos tangbin]# systemctl start mysqld
Job for mysqld.service failed because the control process exited with error code. See "systemctl status mysqld.service" and "journalctl -xe" for details.
**[root@VM-4-17-centos tangbin]# systemctl status mysqld.service**
● mysqld.service - MySQL Server
Loaded: loaded (/usr/lib/systemd/system/mysqld.service; enabled; vendor preset: disabled)
Active: failed (Result: start-limit) since Sun 2022-12-04 20:38:13 CST; 22s ago
Docs: man:mysqld(8)
http://dev.mysql.com/doc/refman/en/using-systemd.html
Process: 2226 ExecStart=/usr/sbin/mysqld $MYSQLD_OPTS (code=exited, status=127)
Process: 2195 ExecStartPre=/usr/bin/mysqld_pre_systemd (code=exited, status=0/SUCCESS)
Main PID: 2226 (code=exited, status=127)
Dec 04 20:38:12 VM-4-17-centos systemd[1]: mysqld.service: main process exited, code=exited, status=127/n/a
Dec 04 20:38:12 VM-4-17-centos systemd[1]: Failed to start MySQL Server.
Dec 04 20:38:12 VM-4-17-centos systemd[1]: Unit mysqld.service entered failed state.
Dec 04 20:38:12 VM-4-17-centos systemd[1]: mysqld.service failed.
Dec 04 20:38:13 VM-4-17-centos systemd[1]: mysqld.service holdoff time over, scheduling restart.
Dec 04 20:38:13 VM-4-17-centos systemd[1]: Stopped MySQL Server.
Dec 04 20:38:13 VM-4-17-centos systemd[1]: start request repeated too quickly for mysqld.service
Dec 04 20:38:13 VM-4-17-centos systemd[1]: Failed to start MySQL Server.
Dec 04 20:38:13 VM-4-17-centos systemd[1]: Unit mysqld.service entered failed state.
Dec 04 20:38:13 VM-4-17-centos systemd[1]: mysqld.service failed.
**[root@VM-4-17-centos tangbin]# journalctl -xe**
-- The result is failed.
Dec 04 20:38:12 VM-4-17-centos systemd[1]: Unit mysqld.service entered failed state.
Dec 04 20:38:12 VM-4-17-centos systemd[1]: mysqld.service failed.
Dec 04 20:38:13 VM-4-17-centos systemd[1]: mysqld.service holdoff time over, scheduling restart.
Dec 04 20:38:13 VM-4-17-centos systemd[1]: Cannot add dependency job for unit rpcbind.socket, ignoring: Unit not found.
Dec 04 20:38:13 VM-4-17-centos systemd[1]: Stopped MySQL Server.
-- Subject: Unit mysqld.service has finished shutting down
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit mysqld.service has finished shutting down.
Dec 04 20:38:13 VM-4-17-centos systemd[1]: start request repeated too quickly for mysqld.service
Dec 04 20:38:13 VM-4-17-centos systemd[1]: Failed to start MySQL Server.
-- Subject: Unit mysqld.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit mysqld.service has failed.
--
-- The result is failed.
Dec 04 20:38:13 VM-4-17-centos systemd[1]: Unit mysqld.service entered failed state.
Dec 04 20:38:13 VM-4-17-centos systemd[1]: mysqld.service failed.
Dec 04 20:38:17 VM-4-17-centos sshd[2241]: Unable to negotiate with 101.207.250.26 port 55144: no matching key exchange method found. Their offer: diffie-hellman-group14-sha1,diffie-hellm
Dec 04 20:38:23 VM-4-17-centos sshd[2253]: Unable to negotiate with 220.179.157.95 port 42638: no matching key exchange method found. Their offer: diffie-hellman-group14-sha1,diffie-hellm
Dec 04 20:38:25 VM-4-17-centos sshd[2260]: Unable to negotiate with 101.207.250.26 port 40644: no matching key exchange method found. Their offer: diffie-hellman-group14-sha1,diffie-hellm
Dec 04 20:38:34 VM-4-17-centos sshd[2274]: Unable to negotiate with 220.179.157.95 port 49296: no matching key exchange method found. Their offer: diffie-hellman-group14-sha1,diffie-hellm
Dec 04 20:38:42 VM-4-17-centos sshd[2290]: Unable to negotiate with 220.179.157.95 port 55716: no matching key exchange method found. Their offer: diffie-hellman-group14-sha1,diffie-hellm
Dec 04 20:38:51 VM-4-17-centos sshd[2309]: Unable to negotiate with 220.179.157.95 port 34040: no matching key exchange method found. Their offer: diffie-hellman-group14-sha1,diffie-hellm
Dec 04 20:39:01 VM-4-17-centos systemd[1]: Started Session 5 of user root.
-- Subject: Unit session-5.scope has finished start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit session-5.scope has finished starting up.
--
-- The start-up result is done.
Dec 04 20:39:01 VM-4-17-centos CROND[2329]: (root) CMD (flock -xn /tmp/stargate.lock -c '/usr/local/qcloud/stargate/admin/start.sh > /dev/null 2>&1 &')
Dec 04 20:39:05 VM-4-17-centos sshd[2361]: Unable to negotiate with 220.179.157.95 port 40640: no matching key exchange method found. Their offer: diffie-hellman-group14-sha1,diffie-hellm
Dec 04 20:39:14 VM-4-17-centos sshd[2385]: Unable to negotiate with 101.207.250.26 port 39830: no matching key exchange method found. Their offer: diffie-hellman-group14-sha1,diffie-hellm
Dec 04 20:39:22 VM-4-17-centos sshd[2399]: Unable to negotiate with 220.179.157.95 port 47100: no matching key exchange method found. Their offer: diffie-hellman-group14-sha1,diffie-hellm
Dec 04 20:39:30 VM-4-17-centos sshd[2413]: Unable to negotiate with 101.207.250.26 port 53506: no matching key exchange method found. Their offer: diffie-hellman-group14-sha1,diffie-hellm
日志里没找到报错信息
网上有人说是root用户没有权限,需要 mysql用户,没明白啥意思
mysql启动不了是什么问题
日志里没找到报错信息???
你去查 /var/log/messages 里面的日志信息,
你可以开2个终端,一个用命令tail -f /var/log/messages
另一个 systemctl restart mysqld
然后看日志的输出,肯定有日志输出的,之后上报错日志上来。
你安装完mysql之后有没有init