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

        

  • 相关阅读:
    Spring解决循环依赖的三种方式
    MySQL深度分页
    MySQL大数据量分页查询方法及其优化
    java进程 cpu100%问题排查
    Java线程池如何合理配置核心线程数
    Btree和B+tree的区别
    Python3 for Linux 安装
    redis sentinel 相关参数及命令
    postman 连接mysql
    oracle-数据库的各种-锁-详解
  • 原文地址:https://www.cnblogs.com/flex_fly/p/3578807.html
Copyright © 2011-2022 走看看