今天,打算重启服务器。停止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.终于成功了。
阅读(1911) | 评论(2) | 转发(0) |