千家信息网

部署禅道数据库报错

发表于:2025-11-23 作者:千家信息网编辑
千家信息网最后更新 2025年11月23日,一 故障描述部署禅道后,无法登录页面。有如下报错信息:60507 17:03:49 [ERROR] /opt/zbox/run/mysql/mysqld: Table './zentao/zt_gro
千家信息网最后更新 2025年11月23日部署禅道数据库报错

一 故障描述

部署禅道后,无法登录页面。有如下报错信息:

60507 17:03:49 [ERROR] /opt/zbox/run/mysql/mysqld: Table './zentao/zt_group' is marked as crashed and last (automatic?) repair failed

禅道所有的数据库表都是使用的MyISAM存储引擎,而MyISAM存储引擎很容易导致数据库表崩溃。


二 解决办法


停掉mysql,然后使用myisamchk检查zt_group这个表的数据库文件zt_group.MYI

myisamchk是mysql自带的MyISAM存储引擎检查和修复工具

# myisamchk zt_group.MYIChecking MyISAM file: zt_group.MYIData records:      11   Deleted blocks:       0myisamchk: warning: Table is marked as crashed and last repair failed- check file-sizemyisamchk: warning: Size of datafile is: 416             Should be: 380- check record delete-chain- check key delete-chain- check index reference- check data record references index: 1- check record linksmyisamchk: error: Keypointers and record positions doesn't matchmyisamchk: warning: Found         13 key parts. Should be: 11MyISAM-table 'zt_group.MYI' is corruptedFix it using switch "-r" or "-o"
# myisamchk -r -o -f zt_group.MYI- recovering (with keycache) MyISAM-table 'zt_group.MYI'Data records: 11


重启启动mysql,然后就可以登录禅道了。





参考文档:

http://www.thinkphp.cn/code/430.html


0