Mysql
cpanel 帳戶傳輸失敗:錯誤:無法轉儲一個或多個數據庫
通過 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
您可以從 phpmyadmin 修復受影響的數據庫/表。phpadmin 應該在 cpanel 首頁中可用。
1.登錄phpMyAdmin
- 選擇受影響的數據庫。如果你只有一個數據庫,它應該預設選擇它,這樣你就不需要做任何事情。
- 在主面板中,您應該會看到數據庫表的列表。選中需要維修的表格旁邊的框。
- 在表格列表正下方的視窗底部,有一個下拉菜單。選擇“修復表”
然後就可以成功轉賬了。