系统重启后,MySQL数据库无法恢复

时间:2016-02-11 00:07:15

标签: mysql innodb

我们的实验室中有一个电源循环,我们的mysql服务器重新启动。

似乎系统创建了我的mysql数据文件夹的tar球,然后取消了它。或者以其他方式,试图'恢复'并且真的搞砸了。

现在我无法访问任何表格“table __不存在”。

所有必要的文件(frm,idb等)似乎都在那里且尺寸正确(非常大)。

不幸的是,我不是数据库管理员,也没有备份。

通过在webz上搜索,似乎没有什么可做但从头开始,但我发现很难相信,mysql可能会在一次操作中弄乱100多个表。

非常感谢任何帮助。

所有权限都是正确的(我认为),并且mysqlcheck没有帮助

以下是我认为发生错误时的一些日志记录(时间戳是screwey,我相信停电的原因)

070102  2:13:07 [Warning] The syntax '--log' is deprecated and will be removed in a future release. Please use '--general-log'/'--general-log-file' instead.
070102  2:13:07 InnoDB: The InnoDB memory heap is disabled
070102  2:13:07 InnoDB: Mutexes and rw_locks use GCC atomic builtins
070102  2:13:07 InnoDB: Compressed tables use zlib 1.2.7
070102  2:13:07 InnoDB: Initializing buffer pool, size = 2.0G
070102  2:13:07 InnoDB: Completed initialization of buffer pool
InnoDB: The first specified data file /test_results/mysql/innodata/ibdata1 did not exist:
InnoDB: a new database to be created!
070102  2:13:08  InnoDB: Setting file /test_results/mysql/innodata/ibdata1 size to 10 MB
InnoDB: Database physically writes the file full: wait...
070102  2:13:08  InnoDB: Log file /test_results/mysql/innolog/ib_logfile0 did not exist: new to be created
InnoDB: Setting log file /test_results/mysql/innolog/ib_logfile0 size to 64 MB
InnoDB: Database physically writes the file full: wait...
070102  2:13:08  InnoDB: Log file /test_results/mysql/innolog/ib_logfile1 did not exist: new to be created
InnoDB: Setting log file /test_results/mysql/innolog/ib_logfile1 size to 64 MB
InnoDB: Database physically writes the file full: wait...
InnoDB: Doublewrite buffer not found: creating new
InnoDB: Doublewrite buffer created
InnoDB: 127 rollback segment(s) active.
InnoDB: Creating foreign key constraint system tables
InnoDB: Foreign key constraint system tables created
070102  2:13:09  InnoDB: Waiting for the background threads to start
070102  2:13:10 InnoDB: 5.5.34 started; log sequence number 0
070102  2:13:10 [Note] Server hostname (bind-address): '0.0.0.0'; port: 3306
070102  2:13:10 [Note]   - '0.0.0.0' resolves to '0.0.0.0';
070102  2:13:10 [Note] Server socket created on IP: '0.0.0.0'.
070102  2:13:11 [Note] Event Scheduler: Loaded 0 events
070102  2:13:11 [Note] /usr/local/libexec/mysqld: ready for connections.

1 个答案:

答案 0 :(得分:0)

这是第一个提示,听起来很奇怪,但启动了MySQLWorkbench的副本。打开管理员的实例并关闭MySQL。关机后,再次启动它。

现在尝试访问您的数据库。