一次MySQL数据意外丢失的经历

作者: admin 日期: 2015-11-04 23:26:40 人气: - 评论: 0

今天QQ上朋友突然说网站打不开了,远程连接异常,紧接着阿里云的vps貌似重启了,重启了之后mysql无法启动了,查看mysql错误日志内容如下:

 22:50:08 2268 [Note] Plugin 'FEDERATED' is disabled.

 22:50:08 9f8 Warning: Using innodb_additional_mem_pool_size is DEPRECATED. This option may be removed in future 


releases, together with the option innodb_use_sys_malloc and with the InnoDB's internal memory allocator.

 22:50:08 2268 [Note] The InnoDB memory heap is disabled

 22:50:08 2268 [Note] Mutexes and rw_locks use Windows interlocked functions

 22:50:08 2268 [Note] Compressed tables use zlib 1.2.3

 22:50:08 2268 [Note] Not using CPU crc32 instructions

 22:50:08 2268 [Note] Initializing buffer pool, size = 16.0M

 22:50:08 2268 [Note] Completed initialization of buffer pool

 22:50:08 2268 [Note] Highest supported file format is Barracuda.

 22:50:08 2268 [Note] The log sequence numbers 0 and 0 in ibdata files do not match the log sequence number 1600614 


in the ib_logfiles!

 22:50:08 2268 [Note] Database was not shutdown normally!

 22:50:08 2268 [Note] Starting crash recovery.

 22:50:08 2268 [Note] Reading tablespace information from the .ibd files...

 22:50:08 2268 [ERROR] Attempted to open a previously opened tablespace. Previous tablespace 5zhe_youxi/core_auth 

赶紧到网上查看解决方案:

在D:\xampp\mysql\bin下面的my.ini中添加

innodb_force_recovery = 1

果然可以启动mysql了不过部分表还是读取不了,使用repair table命令修复还是失败了,虽然工作了将近一年还没有遇到这种情况,不过以后确实要提高安全意识了。

相关内容

发表评论
更多 网友评论0 条评论)
暂无评论

Copyright © 2012-2014 我的代码板 Inc. 保留所有权利。

页面耗时0.0186秒, 内存占用1.82 MB, 访问数据库13次

闽ICP备15009223号-1