Linux MySQL 常见无法启动或启动异常的解决方案 (2)

  Starting mysqld (via systemctl): Job for mysqld.service failed because the  control process exited with error code. See "systemctl status mysqld.service"  and "journalctl -xe" for details、 [FAILED]

  根据提示,使用 systemctl status mysqld.service 和 journalctl -xe 查看服务启动失败的原因。

  [root@ ~]# systemctl status mysqld.servicemysqld.service - SYSV: MySQL  database server.Loaded: loaded (/etc/rc.d/init.d/mysqld)Active: failed (Result:  exit-code) since Wed 2016-01-20 18:26:57 CST; 40s agoDocs:   man:systemd-sysv-generator(8)Process: 2979 Ex主机tart=http://www.likecs.com/etc/rc.d/init.d/mysqld  start (code=exited, status=1/FAILURE)Jan 20 18:26:56 spark01 systemd[1]:  Starting SYSV: MySQL database server….Jan 20 18:26:57 spark01 mysqld[2979]:  MySQL Daemon failed to start.Jan 20 18:26:57 spark01 mysqld[2979]: Starting   mysqld: [FAILED]Jan 20 18:26:57 spark01 systemd[1]: mysqld.service: control  process exited, code=exited status=1Jan 20 18:26:57 spark01 systemd[1]: Failed  to start SYSV: MySQL database server..Jan 20 18:26:57 spark01 systemd[1]: Unit  mysqld.service entered failed state.Jan 20 18:26:57 spark01 systemd[1]:  mysqld.service failed.[root@ ~]#journalctl -xeUnit session-2.scope has begun  starting up.Jan 20 18:26:48 spark01 sshd[2916]: pam_unix(sshd:session): session  opened for user spark by (uid=0)Jan 20 18:26:52 spark01 su[2944]: (to root)  spark on pts/1Jan 20 18:26:52 spark01 su[2944]: pam_unix(su-l:session): session  opened for user root by spark(uid=1000)Jan 20 18:26:56 spark01 polkitd[909]:   Registered Authentication Agent for unix-process:2974:117137 (system bus name  :1.25Jan 20 18:26:56 spark01 systemd[1]: Starting SYSV: MySQL database server….—  Subject: Unit mysqld.service has begun start-up— Defined-By: systemd— Support:   —— Unit   mysqld.service has begun starting up.Jan 20 18:26:57 spark01 mysqld[2979]: MySQL  Daemon failed to start.Jan 20 18:26:57 spark01 mysqld[2979]: Starting mysqld:  [FAILED]Jan 20 18:26:57 spark01 systemd[1]: mysqld.service: control process  exited, code=exited status=1Jan 20 18:26:57 spark01 systemd[1]: Failed to start  SYSV: MySQL database server..— Subject: Unit mysqld.service has failed—   Defined-By: systemd— Support:   —— Unit   mysqld.service has failed.—— The result is failed.Jan 20 18:26:57 spark01  systemd[1]: Unit mysqld.service entered failed state.Jan 20 18:26:57 spark01  systemd[1]: mysqld.service failed.Jan 20 18:26:57 spark01 polkitd[909]:  Unregistered Authentication Agent for unix-process:2974:117137 (system bus name  :1.

  这些信息并不能提供服务启动失败的真正原因。

  查看 MySQL 的告警日志:

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/zzzyjf.html