解决数据库Operation not allowed when innodb(2)

InnoDB: Progress in percents: 1130626 17:05:53  InnoDB: Started; log sequence number 0 13016158
InnoDB: !!! innodb_force_recovery is set to 2 !!!
130626 17:05:53 [Note] Recovering after a crash using /vobiledata/mysqllog/mysql-bin
130626 17:05:53 [Note] Starting crash recovery...
130626 17:05:53 [Note] Crash recovery finished.
 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85130626 17:05:53 [Note] Event Scheduler: Loaded 0 events
130626 17:05:53 [Note] /usr/local/mysql/bin/mysqld: ready for connections.
Version: '5.1.57-log'  socket: '/tmp/mysqld.sock'  port: 3306  MySQL Community Server (GPL)
 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100
InnoDB: Rolling back of trx id 0 15104 completed
130626 17:05:53  InnoDB: Rollback of non-prepared transactions completed

innodb_force_recovery =3 不执行回滚操作

130626 16:33:53  InnoDB: Database was not shut down normally!
InnoDB: Starting crash recovery.
InnoDB: Reading tablespace information from the .ibd files...
InnoDB: Restoring possible half-written data pages from the doublewrite
InnoDB: buffer...
InnoDB: 1 transaction(s) which must be rolled back or cleaned up
InnoDB: in total 9999 row operations to undo
InnoDB: Trx id counter is 0 13056
InnoDB: Last MySQL binlog file position 0 920753, file name /vobiledata/mysqllog/mysql-bin.000245
130626 16:33:53  InnoDB: Started; log sequence number 0 6497918
InnoDB: !!! innodb_force_recovery is set to 3 !!!
130626 16:33:53 [Note] Recovering after a crash using /vobiledata/mysqllog/mysql-bin
130626 16:33:53 [Note] Starting crash recovery...
130626 16:33:53 [Note] Crash recovery finished.
130626 16:33:53 [Note] Event Scheduler: Loaded 0 events
130626 16:33:53 [Note] /usr/local/mysql/bin/mysqld: ready for connections.
Version: '5.1.57-log'  socket: '/tmp/mysqld.sock'  port: 3306  MySQL Community Server (GPL)

innodb_force_recovery =5 不查看重做日志,innodb存储引擎会将未提交的事务事务已经提交
此时数据已经被update
+----+------+------+------+
| a  | b    | c    | d    |
+----+------+------+------+
|  1 |  101 |    1 |    1 |
|  2 |  102 |    2 |    2 |
|  3 |  103 |    3 |    3 |
|  4 |  104 |    4 |    4 |
|  5 |  105 |    5 |    5 |
|  6 |  106 |    6 |    6 |
|  7 |  107 |    7 |    7 |
|  8 |  108 |    8 |    8 |
|  9 |  109 |    9 |    9 |
| 10 |  110 |  10 |  10 |
+----+------+------+------+

innodb_force_recovery =6 不执行前滚操作,但是恢复的时候有回滚操作
+----+------+------+------+
| a  | b    | c    | d    |
+----+------+------+------+
|  1 |  101 |    1 |    1 |
|  2 |  102 |    2 |    2 |
|  3 |  103 |    3 |    3 |
|  4 |  104 |    4 |    4 |
|  5 |  105 |    5 |    5 |
|  6 |  106 |    6 |    6 |
|  7 |  107 |    7 |    7 |
|  8 |  108 |    8 |    8 |
|  9 |  109 |    9 |    9 |
| 10 |  110 |  10 |  10 |
+----+------+------+------+

130626 16:44:29  InnoDB: Database was not shut down normally!
InnoDB: Starting crash recovery.
InnoDB: Reading tablespace information from the .ibd files...
InnoDB: Restoring possible half-written data pages from the doublewrite
InnoDB: buffer...
InnoDB: Doing recovery: scanned up to log sequence number 0 8680656
InnoDB: 1 transaction(s) which must be rolled back or cleaned up
InnoDB: in total 9999 row operations to undo
InnoDB: Trx id counter is 0 14080
InnoDB: Last MySQL binlog file position 0 920753, file name /vobiledata/mysqllog/mysql-bin.000245
InnoDB: Starting in background the rollback of uncommitted transactions
130626 16:44:29  InnoDB: Rolling back trx with id 0 13057, 9999 rows to undo

InnoDB: Progress in percents: 1130626 16:44:29  InnoDB: Started; log sequence number 0 8680656
 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79130626 16:44:29 [Note] Event Scheduler: Loaded 0 events
130626 16:44:29 [Note] /usr/local/mysql/bin/mysqld: ready for connections.
Version: '5.1.57-log'  socket: '/tmp/mysqld.sock'  port: 3306  MySQL Community Server (GPL)
 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100
InnoDB: Rolling back of trx id 0 13057 completed
130626 16:44:29  InnoDB: Rollback of non-prepared transactions completed
130626 16:45:08 mysqld_safe Starting mysqld daemon with databases from /vobiledata/mysqldata
130626 16:45:08 [Note] Plugin 'FEDERATED' is disabled.
130626 16:45:08  InnoDB: Initializing buffer pool, size = 2.0G
130626 16:45:08  InnoDB: Completed initialization of buffer pool
InnoDB: The user has set SRV_FORCE_NO_LOG_REDO on
InnoDB: Skipping log redo
130626 16:45:08  InnoDB: Started; log sequence number 0 0
InnoDB: !!! innodb_force_recovery is set to 6 !!!
130626 16:45:08 [Note] Recovering after a crash using /vobiledata/mysqllog/mysql-bin
130626 16:45:08 [Note] Starting crash recovery...
130626 16:45:08 [Note] Crash recovery finished.
130626 16:45:08 [Note] Event Scheduler: Loaded 0 events
130626 16:45:08 [Note] /usr/local/mysql/bin/mysqld: ready for connections.
Version: '5.1.57-log'  socket: '/tmp/mysqld.sock'  port: 3306  MySQL Community Server (GPL)
130626 16:45:14  InnoDB: error: space object of table test/test,
InnoDB: space id 3 did not exist in memory. Retrying an open.

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/686678c783e9bea6a3dc28b14380becd.html