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

 

 

    

 

 

 

 

 

 

 

 

 

转载于:https://www.cnblogs.com/flex_fly/p/3578807.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值