- 备份数据库命令行:
mysqldump -uroot -p*** --database --skip-lock-tables --add-drop-table --flush-logs --default-character=utf8 otrs > otrs.sql
时出现之下错误:
errror:mysqldump: Couldn‘t execute ‘show create table `article_attachment`‘: File ‘./otrs/article_attachment.MYD‘ not found (Errcode: 13) (29)
经查证这是数据库权限的问题
解决办法:
chgrp -R mysql /var/lib/mysql && chown -R mysql /var/lib/mysql
(2)第二个错误
mysqldump: Error 1194: Table ‘search_profile‘ is marked as crashed and should be repaired when dumping table `search_profile` at row: 46
数据表索引出错
解决办法:myisamchk -c -r /var/lib//mysql/tabname.myi
(3)第三个错误
mysqldump: Couldn‘t execute ‘show create table `xml_storage`‘: Incorrect file format ‘xml_storage‘ (130)
表格式错误
解决办法:
repair table xml_storage use_frm;
之后数据实例可备份成功
时间: 2024-10-12 04:35:17