說(shuō)明
執(zhí)行 mysqldump 時(shí)出現(xiàn)找不到某一個(gè) tables 并且中斷執(zhí)行?及鎖表后延伸出現(xiàn)的問(wèn)題記錄!
問(wèn)題及方案如下
Error Meaage: 執(zhí)行mysqldump 時(shí)出現(xiàn)找不到某一個(gè) tables 并且中斷執(zhí)行
[root@test100 data]# mysqldump fx > fx.sql
mysqldump: Got error: 1146: Table 'user_suggest_report' doesn't exist when using LOCK TABLES
考慮加上 --skip-lock-tables或者-R進(jìn)行鎖表試試,也是不行,信息如下
[root@test100 data]#mysqldump --skip-lock-tables fx > fx.sql
Error: Couldn't read status information for table vote_results () mysqldump: Couldn't execute 'show create table `user_suggest_report`': Table 'fx.user_suggest_report' doesn't exist (1146)
登陸服務(wù)器查看是否存在此表
[root@test100 data]#mysql -h127.0.0.1 -D fx
mysql> show tables; #查看所有的表 --> 發(fā)現(xiàn)是表存在的
+--------------------------------+
| Tables_in_fx |
+--------------------------------+
| user_suggest_report |
+--------------------------------+
80 rows in set (0.00 sec)
刪除此表
mysql> drop table user_suggest_report; #既然是存在的,但是系統(tǒng)卻認(rèn)定不存在說(shuō)明存在問(wèn)題,索性想刪除試試
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'user_suggest_report' at line 1
進(jìn)入mysql存儲(chǔ)目錄下將其數(shù)據(jù)表移動(dòng)或刪除
[root@test100 data]# cat /etc/my.cnf | grep datadir
datadir=/var/lib/mysql
[root@test100 data]# cd /var/lib/mysql/fx/
[root@test100 fx]# mv user_suggest_report.frm /data
重啟mysql服務(wù)器
[root@test100 fx]# service mysqld restart
重新備份操作
[root@test100 data]# mysqldump fx > fx.150109.sql #操作成功
本文由多備份總結(jié) 轉(zhuǎn)載請(qǐng)注明出處