注册 登录  
 加关注
   显示下一条  |  关闭
温馨提示!由于新浪微博认证机制调整,您的新浪微博帐号绑定已过期,请重新绑定!立即重新绑定新浪微博》  |  关闭

php开发lamp

《西安--木木》-经历丰富了生活。 架构师QQ群: 246695517

 
 
 

日志

 
 

mysql清除日志后启动出错  

2013-05-30 14:37:47|  分类: mysql |  标签: |举报 |字号 订阅

  下载LOFTER 我的照片书  |

       今天,打算重启服务器。停止mysql时没有发现什么问题。一切正常,之后reboot ,也正常。
接下来启动mysql,发现不能启动。提示 mysqld_safe mysqld from pid file /usr/local/mysql/data/s96.pid ended,一查看错误日志,发现了如下错误:
 101016 13:23:22 mysqld_safe Starting mysqld daemon with databases from /usr/local/mysql/data
101016 13:23:22 [Warning] '--skip-locking' is deprecated and will be removed in a future release. Please use '--skip-external-locking' instead.
101016 13:23:23 [Note] Plugin 'FEDERATED' is disabled.
101016 13:23:23  InnoDB: Started; log sequence number 214 1068171132
/usr/local/mysql/bin/mysqld: File './mysql-bin.000635' not found (Errcode: 13)
101016 13:23:23 [ERROR] Failed to open log (file './mysql-bin.000635', errno 13)
101016 13:23:23 [ERROR] Could not open log file
101016 13:23:23 [ERROR] Can't init tc log
101016 13:23:23 [ERROR] Aborting
101016 13:23:23  InnoDB: Starting shutdown...
 
查了一下/usr/local/mysql/data 下面的文件,mysql-bin.000635 是存在的!!!!
那为什么这个文件不能加载呢?马上想到权限问题。但是,这个日志文件的权限跟其它日志文件的权限是一样的呀,为什么只是它不能加载呢?
管不了这么多了。先把文件权限改成777再说。
改了文件权限之后,竟然能启动了!!!!
想起昨晚曾经做过master logs的purging.因为日志很大,所以清除时间比较长,这样就影响了业务部门的操作。所以,中断了清除日志的进程。一个晚上没事。
My God,难道mysql启动不了,是跟这个有关?嘿嘿。看来,还是得多学习哇。。。。唉,书到用时方恨少!!!!!
--------------------------------------------------------------------- 
启动resin之后,发现web的用户不能登录,resin的错误日志提示为:
java.sql.SQLException: Can't find file: './robot/login_info.frm' (errno: 13)
        at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1055)
        at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:956)
        at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3536)
        at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3468)
        at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1957)
        at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2107)
        at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2648)
        at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:2086)
        at com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:2237)
        at com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.executeQuery(NewProxyPreparedStatement.java:76)
        at com.db.DBOperationUtil.search(DBOperationUtil.java:252)
        at com.sy.odds.ConfigBuilder.Login(ConfigBuilder.java:208)
        at com.sy.odds.SBO.Login(SBO.java:60)
        at com.sy.odds.SBO.Login(SBO.java:1)
        at com.sy.odds.Service.run(Service.java:72)
        at java.lang.Thread.run(Thread.java:619)
java.sql.SQLException: Can't find file: './robot/active_log.frm' (errno: 13)
        at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1055)
        at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:956)
        at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3536)
        at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3468)
        at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1957)
        at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2107)
        at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2648)
        at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:2086)
        at com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:2237)
        at com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.executeQuery(NewProxyPreparedStatement.java:76)
        at com.db.DBOperationUtil.searchById(DBOperationUtil.java:215)
        at com.odds.entity.ActiveLog.update(ActiveLog.java:80)
        at com.odds.entity.ActiveLog.writeLog(ActiveLog.java:102)
        at com.sy.odds.Service.run(Service.java:80)
        at java.lang.Thread.run(Thread.java:619)
好,依次改了这二个文件的权限为777。重启mysql,resin,竟然还是不能登录。
看了一下mysql错误日志提示:
101016 14:29:44 [ERROR] /usr/local/mysql/bin/mysqld: Can't find file: './robot/login_info.frm' (errno: 13)
101016 14:29:44 [ERROR] /usr/local/mysql/bin/mysqld: Can't find file: './robot/active_log.frm' (errno: 13)
101016 14:29:45 [ERROR] /usr/local/mysql/bin/mysqld: Can't find file: './robot/login_info.frm' (errno: 13)
101016 14:29:45 [ERROR] /usr/local/mysql/bin/mysqld: Can't find file: './robot/active_log.frm' (errno: 13)
101016 14:29:46 [ERROR] /usr/local/mysql/bin/mysqld: Can't find file: './robot/login_info.frm' (errno: 13)
101016 14:29:46 [ERROR] /usr/local/mysql/bin/mysqld: Can't find file: './robot/active_log.frm' (errno: 13)
101016 14:29:47 [ERROR] /usr/local/mysql/bin/mysqld: Can't find file: './robot/login_info.frm' (errno: 13)
101016 14:29:47 [ERROR] /usr/local/mysql/bin/mysqld: Can't find file: './robot/active_log.frm' (errno: 13)
101016 14:29:48 [ERROR] /usr/local/mysql/bin/mysqld: Can't find file: './robot/login_info.frm' (errno: 13)
101016 14:29:48 [ERROR] /usr/local/mysql/bin/mysqld: Can't find file: './robot/active_log.frm' (errno: 13)
什么原因呢?马上google,看了一些类似的错误,原来需要改整个mysql data下robot文件夹的owner!!!好吧,再改。chown -R mysql:mysql /usr/local/mysql/data/robot
再重启mysql,resin.终于成功了。

  评论这张
 
阅读(295)| 评论(0)
推荐 转载

历史上的今天

在LOFTER的更多文章

评论

<#--最新日志,群博日志--> <#--推荐日志--> <#--引用记录--> <#--博主推荐--> <#--随机阅读--> <#--首页推荐--> <#--历史上的今天--> <#--被推荐日志--> <#--上一篇,下一篇--> <#-- 热度 --> <#-- 网易新闻广告 --> <#--右边模块结构--> <#--评论模块结构--> <#--引用模块结构--> <#--博主发起的投票-->
 
 
 
 
 
 
 
 
 
 
 
 
 
 

页脚

网易公司版权所有 ©1997-2017