MySQL启动错误总结

编程入门 行业动态 更新时间:2024-10-23 03:21:49

MySQL启动<a href=https://www.elefans.com/category/jswz/34/1771449.html style=错误总结"/>

MySQL启动错误总结

centos7中出现mysql启动失败排查方法:首先找到/var/log/mysqd.log

    第一种启动失败:

            查看包含最后几行包含error的行;

    [ERROR] Unix socket lock file is empty /tmp/mysql.sock.lock.[ERROR] Unable to setup unix socket lock file.[ERROR] Aborting
    解决方法:

            删除该文件rm -rf /tmp/mysql.sock.lock
            启动:systemctl start mysqld 。即可启动成功。

   
第二种启动失败:
    [ERROR] InnoDB: Ignoring the redo log due to missing MLOG_CHECKPOINT between the checkpoint 41054650 and the end 41056501.[ERROR] InnoDB: Plugin initialization aborted with error Generic error.[ERROR] Plugin 'InnoDB' init function returned error.[ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.[ERROR] Failed to initialize plugins.[ERROR] Aborting

    失败原因:因为ib_logfile文件中记录些innodb引擎非常有用的信息比如说默认的innodb默认的配置信息,在未正常关闭server情况下,重启后的server不支持innodb引擎。

    解决方法:

        找到mysql的安装目录,比如:cd /usr/local/mysql/data;
        删除ib_logfile文件:rm -f ib_logfile*
        启动:systemctl start mysqld

    第三种启动失败:

    这种没有/var/log/mysqd.log,只有看启动状态。

[root@kedacom kedacom]# systemctl status mysqld● mysqld.service - mysqldLoaded: loaded (/usr/lib/systemd/system/mysqld.service; enabled; vendor preset: disabled)Active: failed (Result: exit-code) since 五 2010-12-10 20:43:54 CST; 32min agoProcess: 26272 ExecStart=/usr/local/mysql/support-files/mysql.server start (code=exited, status=1/FAILURE)12月 10 20:43:52 kedacom systemd[1]: Starting mysqld...12月 10 20:43:54 kedacom mysql.server[26272]: Starting MySQL.. ERROR! The server quit without updating PID file (/var/run/mysqld/mysqld.pid).12月 10 20:43:54 kedacom systemd[1]: mysqld.service: control process exited, code=exited status=112月 10 20:43:54 kedacom systemd[1]: Failed to start mysqld.12月 10 20:43:54 kedacom systemd[1]: Unit mysqld.service entered failed state.12月 10 20:43:54 kedacom systemd[1]: mysqld.service failed.
    失败原因:

        缺少/var/run/mysqld

    解决方法:

        创建目录,并附权限。mkdir /var/run/mysqld;chown -R mysql:mysql /var/run/mysqld/

    另类错误:

    ERROR 1370 (42000) at line 1974: execute command denied to user 'joeuser'@'%' for routine 'joe.ARCHIVE_ROUND'

    执行 mysql -uroot -pJoe mysql登录后,执行show grants for ‘joeuser’
 

更多推荐

MySQL启动错误总结

本文发布于:2023-12-08 12:16:52,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1672763.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:错误   MySQL

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!