本地mysql因为电脑突然重启造成了mysql无法启动
展开阅读全文

记录一次mysql断电后无法启动问题

无奈的断电。出现mysql无法启动。

1.查看error 

130313 15:31:13 [Note] Plugin 'FEDERATED' is disabled. 

130313 15:31:13  InnoDB: Initializing buffer pool, size = 107.0M 

130313 15:31:13  InnoDB: Completed initialization of buffer pool 

InnoDB: Log scan progressed past the checkpoint lsn 2 3605230851 

130313 15:31:13  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 2 3605259847 

130313 15:31:14  InnoDB: Starting an apply batch of log records to the database... 

InnoDB: Progress in percents: 0 1 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 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 

InnoDB: Apply batch completed 

130313 15:31:14  InnoDB: Started; log sequence number 2 3605259847 

130313 15:31:14 [Note] Event Scheduler: Loaded 0 events 

130313 15:31:14 [Note] D:\Program Files (x86)\MySQL\MySQL Server 5.1\bin\mysqld: ready for connections. 

Version: '5.1.63-community'  socket: ''  port: 3306  MySQL Community Server (GPL) 

130313 15:31:16  InnoDB: Assertion failure in thread 5732 in file .\fsp\fsp0fsp.c line 3341 

InnoDB: We intentionally generate a memory trap. 

InnoDB: Submit a detailed bug report to https://bugs.mysql.com. 

InnoDB: If you get repeated assertion failures or crashes, even 

InnoDB: immediately after the mysqld startup, there may be 

InnoDB: corruption in the InnoDB tablespace. Please refer to 

InnoDB: https://dev.mysql.com/doc/refman/5.1/en/forcing-innodb-recovery.html 

InnoDB: about forcing recovery. 

网上找了一些解决方案。

最后将修改mysql的my.ini里面

[mysqld] 
innodb_force_recovery = 4 

重启下即可