您现在的位置:龙卷风首页 ›› 办公室援助 ›› 阅读文章

mysql 数据库错误

mysql 错误日志

无意中打开服务器事件看了一下,发现满是mysql的错误。其中有大都是:

080330 22:10:52080330 22:10:52 [ERROR] Cannot find table yjsbbs/wp_options 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?

See http://dev.mysql.com/doc/refman/5.0/en/innodb-troubleshooting.html

how you can resolve the problem.

打开上面提供的链接,第一个指示是:

When an operation fails or you suspect a bug, you should look at the MySQL server error log, which is the file in the data directory that has a suffix of .err.

打开这个文件一看,发现提供的错误信息就是事务日志中的信息。

于是试着移除两个出现错误的.frm文件,网站运行正常(1),观察是否还出现错误(2)。如果网站正常并且没有再出现错误,那么上面就是处理错误的正确方法了。

作者 不见不散 本文仅代表作者观点,与龙卷风资讯网立场无关。

我来说两句

1 楼 zhangfurong 发表于 2008-4-17 From IP: 61.140.107.139
要学php,最好先学习它的错误机制!!
作者主页: http://8user.com
2 楼 站长 发表于 2008-3-31 From IP: 121.32.18.160
经过观察,自从移除了.frm文件之后,数据库再没有报错。
作者主页: 
内容/Content