通过 whm 传输实用程序传输多个帐户时出现此错误:
错误:无法转储一个或多个数据库
cpanel 技术人员告诉我的
Here is the specific error I'm seeing on some of the accounts:
warn [pkgacct] eli_test: mysqldump: Got error: 1034: Incorrect key file for table 'bak_components'; try to repair it when using LOCK TABLES
You may need to try to repair these tables as suggested in the error. After some further research I see you're using myisam, so you may want to use the myisam check and repair as well:
http://www.thegeekstuff.com/2008/09/how-to-repair-corrupted-mysql-tables-using-myisamchk/
我已经运行过这个:
mysqlcheck --all-databases -r
mysqlcheck --all-databases -a
mysqlcheck --all-databases -o
另外,我甚至在 mysql 停止的情况下重新尝试传输,但得到了以下结果:
Determining mysql dbs.../usr/bin/mysqladmin: connect to server at 'localhost' failed
我尝试修复 mysiam:
root@server [/var/lib/mysql]# myisamchk --silent --force --fast --update-state /var/lib/mysql/e*/*.MYI
myisamchk: MyISAM file /var/lib/mysql/edisecur_joom/user_core_acl_aro.MYI
myisamchk: warning: 1 client is using or hasn't closed the table properly
myisamchk: MyISAM file /var/lib/mysql/edisecur_joom/user_session.MYI
myisamchk: warning: 10 clients are using or haven't closed the table properly
myisamchk: MyISAM file /var/lib/mysql/eximstats/sends.MYI
myisamchk: warning: Table is marked as crashed
myisamchk: warning: 1 client is using or hasn't closed the table properly
myisamchk: error: Found 138761 keys of 138908
myisamchk: MyISAM file /var/lib/mysql/eximstats/smtp.MYI
myisamchk: warning: Table is marked as crashed and last repair failed
myisamchk: Unknown error 126
myisamchk: error: Can't read indexpage from filepos: -1
root@server [/var/lib/mysql]# myisamchk --silent --force --fast --update-state /var/lib/mysql/i*/*.MYI
myisamchk: MyISAM file /var/lib/mysql/impact_joom/j25_content.MYI
myisamchk: warning: 1 client is using or hasn't closed the table properly
myisamchk: MyISAM file /var/lib/mysql/impact_joom/j25_session.MYI
myisamchk: warning: 1 client is using or hasn't closed the table properly
root@server [/var/lib/mysql]# myisamchk --silent --force --fast --update-state /var/lib/mysql/k*/*.MYI
myisamchk: MyISAM file /var/lib/mysql/korol_joom/user_core_acl_aro.MYI
myisamchk: warning: 3 clients are using or haven't closed the table properly
root@server [/var/lib/mysql]# myisamchk --silent --force --fast --update-state /var/lib/mysql/l*/*.MYI
myisamchk: MyISAM file /var/lib/mysql/loteriad_joomla/user_phocadownload.MYI
myisamchk: warning: 1 client is using or hasn't closed the table properly
myisamchk: MyISAM file /var/lib/mysql/loteriad_joomla/user_phocadownload_user_stat.MYI
myisamchk: warning: 1 client is using or hasn't closed the table properly
myisamchk: MyISAM file /var/lib/mysql/loteriad_joomla/user_session.MYI
myisamchk: warning: 1 client is using or hasn't closed the table properly
root@server [/var/lib/mysql]# myisamchk --silent --force --fast --update-state /var/lib/mysql/m*/*.MYI
myisamchk: MyISAM file /var/lib/mysql/mfa_wp216/wp_options.MYI
myisamchk: warning: 1 client is using or hasn't closed the table properly
myisamchk: MyISAM file /var/lib/mysql/mfa_wp216/wp_statistics_date.MYI
myisamchk: warning: 1 client is using or hasn't closed the table properly
myisamchk: MyISAM file /var/lib/mysql/mfa_wp216/wp_statistics_visits.MYI
myisamchk: warning: 1 client is using or hasn't closed the table properly
root@server [/var/lib/mysql]# myisamchk --silent --force --fast --update-state /var/lib/mysql/n*/*.MYI
myisamchk: error: File '/var/lib/mysql/n*/*.MYI' doesn't exist
myisamchk: error: File '/var/lib/mysql/n*/*.MYI' doesn't exist
我尝试点击以下链接:
https://forums.cpanel.net/f49/mysql-databases-only-backup-293142.html#post12
它们都将 SQL 保存在一个目录中。在目标服务器上使用 /var/lib/mysql/ 中的各自用户名目录重新映射它们,最简单、最快捷的方法是什么?
当我运行上述程序时出现这些错误
root@server [~]# for i in `cat /root/mysql.txt`; do mysqldump $i >
/backup/db_backup/$i.sql; done
mysqldump: Got error: 1034: Incorrect key file for table 'user_core_adi_aro';
try to repair it when using LOCK TABLES
mysqldump: Got error: 1034: Incorrect key file for table 'user_components';
try to repair it when using LOCK TABLES
mysqldump: Got error: 1034: Incorrect key file for table 'user_core_adi_aro';
try to repair it when using LOCK TABLES
mysqldump: Got error: 1034: Incorrect key file for table 'bak_components';
try to repair it when using LOCK TABLES
mysqldump: Got error: 1034: Incorrect key file for table 'user_components';
try to repair it when using LOCK TABLES
mysqldump: Got error: 1034: Incorrect key file for table 'user_core_adi_aro';
try to repair it when using LOCK TABLES
mysqldump: Got error: 1034: Incorrect key file for table 'sys_refindex'; try
to repair it when using LOCK TABLES
mysqldump: Got error: 1034: Incorrect key file for table
'nuke_theme_tplfile'; try to repair it when using LOCK TABLES
mysqldump: Got error: 1034: Incorrect key file for table 'user_core_adi_aro';
try to repair it when using LOCK TABLES
mysqldump: Got error: 1034: Incorrect key file for table 'user_core_adi_aro';
try to repair it when using LOCK TABLES
mysqldump: Got error: 1034: Incorrect key file for table 'node'; try to
repair it when using LOCK TABLES
答案1
您可以从 phpmyadmin 修复受影响的数据库/表。phpadmin 应该在 cpanel 主页中可用。
1.登录phpMyAdmin
选择受影响的数据库。如果您只有一个数据库,系统会默认选择该数据库,因此您无需执行任何操作。
在主面板中,您应该会看到数据库表的列表。选中需要修复的表旁边的复选框。
在窗口底部的表格列表下方,有一个下拉菜单。选择“修复表格”
即可成功转移账户。