zoukankan      html  css  js  c++  java
  • mysql 断电 启动不了 start: Job failed to start

    公司内部服务器,突然断电,造成无法启动的解决办法

    把my.cnf中配置的datadir路径下的ib_logfile* (比如ib_logfile0, lb_logfile1....)文件移到另外一个目录中, 备用

    然后再/etc/init.d/mysql start,或者其它启动方法 /usr/bin/mysqld_safe & 等启动,

    检查是否正确启动!

    以下是检查过程------------------------------############################################

    root@1399cx:/home/gm# /etc/init.d/mysql start
    Rather than invoking init scripts through /etc/init.d, use the service(8)
    utility, e.g. service mysql start

    Since the script you are attempting to invoke has been converted to an
    Upstart job, you may also use the start(8) utility, e.g. start mysql
    start: Job failed to start
    root@1399cx:/home/gm# /usr/bin/mysqld_safe -uroot &
    [1] 4236
    root@1399cx:/home/gm# 140303 17:02:53 mysqld_safe Logging to syslog.-------------------错误日志记录到此处.

    输入命令: locate syslog

    得知syslog在/var/log/目录下,即/var/log/syslog

    输入命令 : tail -n 40 /var/log/syslog

    显示以下错误日志

    --------------------

     Error: log file ./ib_logfile0 is of different size 0 5242880 bytes----------------------google了一下 这个错误,

    得知,把日志文件移动其它目录下,也许可以正常启动mysql

    ---------------------------------

    立马移动日志

    我的日志文件在/home/mysql_dir下

    输入命令: cd /home/mysql_dir

    输入命令: mv lb_logfile*   /home/bakdir  #备份日志文件到其它目录

    输入命令: /etc/init.d/mysql start   #启动mysql

    --------------------------#################################################------------

    稍等片刻,mysql终于启动了....好兴奋....

        

  • 相关阅读:
    Android Activity生命周期
    Android 横屏切换竖屏Activity的生命周期(转)
    (引用)mysql总结(二)
    (转载)mysql指令总结
    (引用)性能测试没有告诉你的
    参数化(引用)
    (引用)什么时候开展性能(二)
    (引用)什么时候开展性能(一)
    性能测试中容易混淆的概念
    浏览器内核
  • 原文地址:https://www.cnblogs.com/flex_fly/p/3578807.html
Copyright © 2011-2022 走看看