• MySQL启动错误总结


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

        第一种启动失败:

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

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

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

       
    第二种启动失败:
    1. [ERROR] InnoDB: Ignoring the redo log due to missing MLOG_CHECKPOINT between the checkpoint 41054650 and the end 41056501.
    2. [ERROR] InnoDB: Plugin initialization aborted with error Generic error.
    3. [ERROR] Plugin 'InnoDB' init function returned error.
    4. [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
    5. [ERROR] Failed to initialize plugins.
    6. [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,只有看启动状态。

    1. [root@kedacom kedacom]# systemctl status mysqld
    2. ● mysqld.service - mysqld
    3. Loaded: loaded (/usr/lib/systemd/system/mysqld.service; enabled; vendor preset: disabled)
    4. Active: failed (Result: exit-code) since 五 2010-12-10 20:43:54 CST; 32min ago
    5. Process: 26272 ExecStart=/usr/local/mysql/support-files/mysql.server start (code=exited, status=1/FAILURE)
    6. 12月 10 20:43:52 kedacom systemd[1]: Starting mysqld...
    7. 12月 10 20:43:54 kedacom mysql.server[26272]: Starting MySQL.. ERROR! The server quit without updating PID file (/var/run/mysqld/mysqld.pid).
    8. 12月 10 20:43:54 kedacom systemd[1]: mysqld.service: control process exited, code=exited status=1
    9. 12月 10 20:43:54 kedacom systemd[1]: Failed to start mysqld.
    10. 12月 10 20:43:54 kedacom systemd[1]: Unit mysqld.service entered failed state.
    11. 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’
     

  • 相关阅读:
    SpringBoot使用配置中心Apollo启动很慢两分钟解决
    WRF-Chem在大气环境(PM2.5、臭氧)、能见度、城市化方面应用
    Python pywin32实现word和Excel的处理
    iOS 实现动态切换网络请求Host 域名
    长沙物业满意度调查找第三方|群狼调研(长沙物业竞争对手分析)
    从零开始搭建Electron项目之运行例程
    剑指 Offer 53 - I. 在排序数组中查找数字 I
    Python字符串类型详解(三)——字符串类型的格式化
    柴油发电机负载测试的方法
    CMake继续学习
  • 原文地址:https://blog.csdn.net/a1010256340/article/details/133890018