gpt4 book ai didi

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

转载 作者:行者123 更新时间:2023-11-29 21:30:04 24 4
gpt4 key购买 nike

我们的实验室进行了电源循环,并且我们的 mysql 服务器重新启动。

系统似乎为我的 mysql 数据文件夹创建了一个 tar 包,然后将其解压。或者以其他方式试图“恢复”,但确实把事情搞砸了。

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

所有必要的文件(frm、idb 等)似乎都在那里并且大小正确(相当大)。

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

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

非常感谢任何帮助。

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

以下是我认为发生错误时的一些日志摘录(时间戳很奇怪,我认为是停电的原因)

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.

最佳答案

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

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

关于系统重启后MySQL数据库无法恢复,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35328454/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com