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终于启动了....好兴奋....

        

  • 相关阅读:
    POJ 1691 Painting a Board(状态压缩DP)
    POJ 1946 Cow Cycling(抽象背包, 多阶段DP)
    Leetcode: Best Time to Buy and Sell Stock I, II
    Leetcode: Valid Palindrome
    POJ 1946 Cow Cycling
    POJ 1661 Help Jimmy(递推DP)
    POJ 1160 Post Office(区间DP)
    POJ 2486 apple tree
    Android播放器框架分析之AwesomePlaye
    【开源框架】Android之史上最全最简单最有用的第三方开源库收集整理,有助于快速开发,欢迎各位...
  • 原文地址:https://www.cnblogs.com/flex_fly/p/3578807.html
Copyright © 2011-2022 走看看