〇 mysqldump: Error: Query execution was interrupted, maximum statement execution time exceeded when trying to dump tablespaces 〇 mysqldump: Error 3024: Query execution was interrupted, maximum statement execution time exceeded when dumping table `$tb_name` at row: xxxx
版本: MySQL 5.7.8+ 原因: max_execution_time過小 處理思路: ① 通過hints,增大N值(文檔說,在hints用法中,將N改為0為無限制,但我測下來不生效,可設置成一個較大值如999999解決) SELECT /*+ MAX_EXECUTION_TIME(N) */ * FROM t1 LIMIT 100000; ② 修改max_execution_time值,將該值設置為較大一個值,或設置為0(不限制) 附錄: 該參數5.7.8被添加,單位為ms,動態參數,默認為0,設置為0時意味著SELECT超時不被設置(不限制超時時間)。不作用于存儲過程中的SELECT語句,并且只作用于只讀的SELECT,如INSERT ... SELECT ... 是不被作用的。 for more information: http://blog.itpub.net/29773961/viewspace-2150443/
〇 mysqldump: Couldnt execute SHOW FIELDS FROM `$view_name`: View $db_name.$view_name references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them (1356)
〇 mysqldump: Couldnt execute show create table `$view_name`: Illegal mix of collations for operation UNION (1271) 原因: 創建view時,使用UNION時存在非法的排序規則組合。 處理思路: 檢查該視圖定義,檢查字符集,考慮重建或刪除視圖。
〇 mysqldump: Couldnt execute SHOW FIELDS FROM `$view_name`: The user specified as a definer ($user@$host) does not exist (1449) 〇 mysqldump: Couldnt execute show table status like $view_name: SELECT command denied to user @% for column $col_name in table $tb_name (1143)
〇 mysqldump: Error 1412: Table definition has changed, please retry transaction when dumping table `$tb_name` at row: 0
原因: 在備份該表時,表定義被修改。FLUSH TABLE WITH READ LOCK只保證數據一致性,并不保證schema不被修改。 處理思路: 備份時期不做DDL操作。 復現一:
① session1>CREATETABLE a (id int) ENGINE=InnoDB;
② session2> START TRANSACTION WITH CONSISTENT SNAPSHOT;
③ session1> ALTER TABLE a ADD COLUMN name varchar(32);
④ session2>SELECT*FROM a;
ERROR 1412 (HY000):Table definition has changed, please retry transaction
p.s. 如果③和④調換順序,則ALTER TABLE無法成功,則會等待MDL。 復現二:
① session1> START TRANSACTION WITH CONSISTENT SNAPSHOT;
② session2>CREATETABLE b (id int) ENGINE=InnoDB;
③ session1>SELECT*FROM b;
ERROR 1412 (HY000):Table definition has changed, please retry transaction
〇 mysqldump: Couldnt execute show create table `$tb_name`: Unable to open underlying table which is differently defined or of non-MyISAM type or doesnt exist (1168)
〇 mysqldump: Couldnt execute show create table `$tb_name`: Table ./$db_name/$tb_name is marked as crashed and last (automatic?) repair failed (144) 〇 mysqldump: Couldnt execute show create table `$tb_name`: Table ./$db_name/$tb_name is marked as crashed and should be repaired (145) 〇 mysqldump: Error 1194: Table throne_tower is marked as crashed and should be repaired when dumping table `$tb_name` at row: xxxxx
〇 mysqldump: Error: Got error 28 from storage engine when trying to dump tablespaces mysqldump: Couldnt execute show fields from `$tb_name`: Got error 28 from storage engine (1030)
〇 mysqldump: Lost connection to MySQL server during query (2013) ERROR 2002 (HY000): Can't connect to local MySQL server through socket '@@socket' (111)
〇 mysqldump: Couldn't execute 'SHOW SLAVE STATUS': Access denied; you need (at least one of) the SUPER, REPLICATION CLIENT privilege(s) for this operation (1227)