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

        

  • 相关阅读:
    仿苹果菜单的效果
    不用系统自带的复选框,单选按钮,选择框的样式,该怎么做
    js面向对象(三)---组件开发
    JS面向对象(二)---继承
    js面向对象(一)---基本的概念、属性、方法
    移动端新建html页面
    《程序员思维修炼》读后摘录
    做一个简单的贪吃蛇游戏
    做一个简单的遮罩层
    在不同设备上控制元素
  • 原文地址:https://www.cnblogs.com/flex_fly/p/3578807.html
Copyright © 2011-2022 走看看