gpt4 book ai didi

MySQL db 消失了如何跟踪发生了什么?

转载 作者:可可西里 更新时间:2023-11-01 08:35:36 25 4
gpt4 key购买 nike

两天前我安装了 RoundCube 邮件脚本,用于:

PHP

Name        : php
Arch : x86_64
Version : 5.3.18
Release : 1.el6.remi

MySQL

Name        : mysql
Arch : x86_64
Version : 5.5.28
Release : 1.el6.remi

直到今天早上一切都很好,脚本指出 Round Cube 数据库有问题。我在看目录时有多奇怪:

/var/lib/mysql/roundcubemail

只有frm文件,没有任何.myd或.myi

cache.frm
cache_index.frm
cache_messages.frm
cache_thread.frm
contactgroupmembers.frm
contactgroups.frm
contacts.frm
db.opt
dictionary.frm
identities.frm
searches.frm
session.frm
users.frm

我的服务器有 12 个数据库,现在只有 Round Cube 数据库缺少 .myd .myi 文件。重新安装这个脚本不是问题,但我很想弄清楚这个数据库发生了什么,并确保它不会再次发生。

MySQL错误日志只有这个信息:

121117  7:38:06 [ERROR] Cannot find or open table roundcubemail/session from
the internal data dictionary of InnoDB though the .frm file for the
table exists. Maybe you have deleted and recreated InnoDB data
files but have forgotten to delete the corresponding .frm files
of InnoDB tables, or you have moved .frm files to another database?
or, the table contains indexes that this version of the engine
doesn't support.
See http://dev.mysql.com/doc/refman/5.5/en/innodb-troubleshooting.html
how you can resolve the problem.

我的问题是:是否有其他方法可以跟踪这种情况并找到数据库刚刚消失的原因?

最佳答案

.myd.myi 文件只存在于 MyISAM 表中。

如果您遵循标准的 Roudcube 安装程序(通过 v0.8.4 验证),表将设置为使用 InnoDB 存储引擎。

您是否弄乱了 /var/lib/mysql/ 下的任何文件?默认情况下,InnoDB 表存储在一个文件中,在您的情况下可能是 /var/lib/mysql/ibdata1。如果没有,请查找 innodb_data_file_path my.cnf 配置文件中的指令。

关于MySQL db 消失了如何跟踪发生了什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13559929/

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