文章目录
- 错误之前所作的操作
- 错误描述
- 查看错误信息
- 解决办法
错误之前所作的操作
在/etc/my.cnf文件中开启了mysqld的二进制日志文件,然后将产生的二进制日志文件删除,再重新开启,服务就不能开启了
错误描述
mysql服务一直重启不了
查看错误信息
[root@localhost ~]# systemctl restart 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@localhost ~]# systemctl status mysqld.service
● mysqld.service - MySQL Server
Loaded: loaded (/usr/lib/systemd/system/mysqld.service; disabled; vendor preset: disabled)
Active: failed (Result: start-limit) since 一 2020-08-24 19:59:08 CST; 336ms ago
Docs: man:mysqld(8)
http://dev.mysql.com/doc/refman/en/using-systemd.html
Process: 28731 ExecStart=/usr/local/mysql/bin/mysqld --daemonize --pid-file=/usr/local/mysql/mysqld.pid $MYSQLD_OPTS (code=exited, status=1/FAILURE)
Process: 28713 ExecStartPre=/usr/local/mysql/bin/mysqld_pre_systemd (code=exited, status=0/SUCCESS)
Main PID: 27399 (code=exited, status=0/SUCCESS)
8月 24 19:59:07 localhost.localdomain systemd[1]: Failed to start MySQL Server.
8月 24 19:59:07 localhost.localdomain systemd[1]: Unit mysqld.service entered failed state.
8月 24 19:59:07 localhost.localdomain systemd[1]: mysqld.service failed.
8月 24 19:59:08 localhost.localdomain systemd[1]: mysqld.service holdoff time over, scheduling restart.
8月 24 19:59:08 localhost.localdomain systemd[1]: Stopped MySQL Server.
8月 24 19:59:08 localhost.localdomain systemd[1]: start request repeated too quickly for mysqld.service
8月 24 19:59:08 localhost.localdomain systemd[1]: Failed to start MySQL Server.
8月 24 19:59:08 localhost.localdomain systemd[1]: Unit mysqld.service entered failed state.
8月 24 19:59:08 localhost.localdomain systemd[1]: mysqld.service failed.
[root@localhost ~]# journalctl -xe
8月 24 19:59:06 localhost.localdomain mysqld[28731]: 2020-08-24T11:59:06.282440Z 0 [Note] InnoDB: Starting shutdown...
8月 24 19:59:06 localhost.localdomain mysqld[28731]: 2020-08-24T11:59:06.383337Z 0 [Note] InnoDB: Dumping buffer pool(s) to /usr/local/mysql/data/ib_buffer_pool
8月 24 19:59:06 localhost.localdomain mysqld[28731]: 2020-08-24T11:59:06.384556Z 0 [Note] InnoDB: Buffer pool(s) dump completed at 200824 19:59:06
8月 24 19:59:07 localhost.localdomain mysqld[28731]: 2020-08-24T11:59:07.694853Z 0 [Note] InnoDB: Shutdown completed; log sequence number 2840759
8月 24 19:59:07 localhost.localdomain mysqld[28731]: 2020-08-24T11:59:07.696026Z 0 [Note] InnoDB: Removed temporary tablespace data file: "ibtmp1"
8月 24 19:59:07 localhost.localdomain mysqld[28731]: 2020-08-24T11:59:07.696077Z 0 [Note] Shutting down plugin 'MEMORY'
8月 24 19:59:07 localhost.localdomain mysqld[28731]: 2020-08-24T11:59:07.696085Z 0 [Note] Shutting down plugin 'CSV'
8月 24 19:59:07 localhost.localdomain mysqld[28731]: 2020-08-24T11:59:07.696087Z 0 [Note] Shutting down plugin 'sha256_password'
8月 24 19:59:07 localhost.localdomain mysqld[28731]: 2020-08-24T11:59:07.696089Z 0 [Note] Shutting down plugin 'mysql_native_password'
8月 24 19:59:07 localhost.localdomain mysqld[28731]: 2020-08-24T11:59:07.696219Z 0 [Note] Shutting down plugin 'binlog'
8月 24 19:59:07 localhost.localdomain mysqld[28731]: 2020-08-24T11:59:07.696348Z 0 [Note] /usr/local/mysql/bin/mysqld: Shutdown complete
8月 24 19:59:07 localhost.localdomain 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.
8月 24 19:59:07 localhost.localdomain systemd[1]: Unit mysqld.service entered failed state.
8月 24 19:59:07 localhost.localdomain systemd[1]: mysqld.service failed.
8月 24 19:59:08 localhost.localdomain systemd[1]: mysqld.service holdoff time over, scheduling restart.
8月 24 19:59:08 localhost.localdomain 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.
8月 24 19:59:08 localhost.localdomain systemd[1]: start request repeated too quickly for mysqld.service
8月 24 19:59:08 localhost.localdomain 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.
8月 24 19:59:08 localhost.localdomain systemd[1]: Unit mysqld.service entered failed state.
8月 24 19:59:08 localhost.localdomain systemd[1]: mysqld.service failed.
解决办法
将/etc/my.cnf文件中原来定义的二进制日志文件名重新定义,改一个名字,就可以正常开启了。