{"id":209794,"date":"2022-08-19T04:00:19","date_gmt":"2022-08-18T20:00:19","guid":{"rendered":"https:\/\/www.keaglegz.com\/209794.html"},"modified":"2026-07-15T06:36:44","modified_gmt":"2026-07-14T22:36:44","slug":"mysqldump%e5%a4%87%e4%bb%bd%e5%a4%b1%e8%b4%a5%e4%bb%a5%e5%8f%8a%e8%a7%a3%e5%86%b3%e6%96%b9%e6%b3%95%e6%b1%87%e6%80%bb","status":"publish","type":"post","link":"https:\/\/www.dongwubaike.cn\/fanhao\/209794.html","title":{"rendered":"mysqldump\u5907\u4efd\u5931\u8d25\u4ee5\u53ca\u89e3\u51b3\u65b9\u6cd5\u6c47\u603b"},"content":{"rendered":"\n<p><span><span style=\"color: #0000ff\"><span style=\"font-size: 14px;color: #e53333\"><strong>MySQLdump\u5907\u4efd\u5931\u8d25\u4ee5\u53ca\u89e3\u51b3\u65b9\u6cd5\u6c47\u603b<\/strong><\/span><\/span><\/span><\/p>\n<p><span><span style=\"color: #0000ff\"><span style=\"font-size: 14px;color: #e53333\"><strong>\u3007 mysqldump: Error: Query execution was interrupted, maximum statement execution time exceeded when trying to dump tablespaces <\/strong><\/span><br \/><span style=\"font-size: 14px;color: #e53333\"><strong>\u3007 mysqldump: Error 3024: Query execution was interrupted, maximum statement execution time exceeded when dumping table `$tb_name` at row: xxxx<\/strong><\/span><\/p>\n<p><span style=\"font-size: 14px\"><strong><span style=\"color: #337fe5\">\u7248\u672c\uff1a<\/span><\/strong><\/span><br \/><span style=\"font-size: 14px\">MySQL 5.7.8+<\/span><br \/><span style=\"font-size: 14px;color: #337fe5\"><strong>\u539f\u56e0\uff1a<\/strong><\/span><br \/><span style=\"font-size: 14px\">max_execution_time\u8fc7\u5c0f<\/span><br \/><span style=\"font-size: 14px;color: #337fe5\"><strong>\u5904\u7406\u601d\u8def\uff1a<\/strong><\/span><br \/><span style=\"font-size: 14px\">\u2460 \u901a\u8fc7hints\uff0c\u589e\u5927N\u503c\uff08\u6587\u6863\u8bf4\uff0c\u5728hints\u7528\u6cd5\u4e2d\uff0c\u5c06N\u6539\u4e3a0\u4e3a\u65e0\u9650\u5236\uff0c\u4f46\u6211\u6d4b\u4e0b\u6765\u4e0d\u751f\u6548\uff0c\u53ef\u8bbe\u7f6e\u6210\u4e00\u4e2a\u8f83\u5927\u503c\u5982999999\u89e3\u51b3\uff09<\/span><br \/><span style=\"font-size: 14px\">SELECT \/*+ MAX_EXECUTION_TIME(N) *\/ * FROM t1 LIMIT 100000;<\/span><br \/><span style=\"font-size: 14px\">\u2461 \u4fee\u6539max_execution_time\u503c\uff0c\u5c06\u8be5\u503c\u8bbe\u7f6e\u4e3a\u8f83\u5927\u4e00\u4e2a\u503c\uff0c\u6216\u8bbe\u7f6e\u4e3a0\uff08\u4e0d\u9650\u5236\uff09<\/span><br \/><span style=\"font-size: 14px\">\u9644\u5f55\uff1a<\/span><br \/><span style=\"font-size: 14px\">\u8be5\u53c2\u65705.7.8\u88ab\u6dfb\u52a0\uff0c\u5355\u4f4d\u4e3ams\uff0c\u52a8\u6001\u53c2\u6570\uff0c\u9ed8\u8ba4\u4e3a0\uff0c\u8bbe\u7f6e\u4e3a0\u65f6\u610f\u5473\u7740SELECT\u8d85\u65f6\u4e0d\u88ab\u8bbe\u7f6e\uff08\u4e0d\u9650\u5236\u8d85\u65f6\u65f6\u95f4\uff09\u3002\u4e0d\u4f5c\u7528\u4e8e\u5b58\u50a8\u8fc7\u7a0b\u4e2d\u7684SELECT\u8bed\u53e5\uff0c\u5e76\u4e14\u53ea\u4f5c\u7528\u4e8e\u53ea\u8bfb\u7684SELECT\uff0c\u5982INSERT &#8230; SELECT &#8230; \u662f\u4e0d\u88ab\u4f5c\u7528\u7684\u3002<br \/><strong>for more information:<\/strong><br \/><strong>http:\/\/blog.itpub.net\/29773961\/viewspace-2150443\/<\/strong><\/span><\/p>\n<p><span style=\"font-size: 14px\"><strong><span style=\"color: #e53333\">\u3007 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)<\/span><\/strong><\/span><\/p>\n<p><span style=\"font-size: 14px\"><strong><span style=\"color: #337fe5\">\u539f\u56e0\uff1a<\/span><\/strong><\/span><br \/><span style=\"font-size: 14px\">\u8be5view\u5f15\u7528\u4e86\u65e0\u6548\u7684\u8868\uff0c\u5217\uff0c\u51fd\u6570\u6216\u8005\u5b9a\u4e49\u8005\u3002<\/span><br \/><span style=\"font-size: 14px\"><strong><span style=\"color: #337fe5\">\u5904\u7406\u601d\u8def\uff1a<\/span><\/strong><\/span><br \/><span style=\"font-size: 14px\">\u53ef\u4ee5\u6839\u636e\u62a5\u9519\u4fe1\u606f\uff0c\u8fdb\u5165db\uff0c\u6267\u884cSHOW CREATE VIEW $view_nameG\uff0c\u67e5\u770b\u8be5view\u7684\u5b9a\u4e49\uff0c\u9010\u4e00\u68c0\u67e5\u8be5view\u7684\u57fa\u8868\uff0c\u5217\uff0c\u6216\u76f8\u5173\u51fd\u6570\u4e0e\u7528\u6237\u662f\u5426\u5177\u6709\u76f8\u5173\u6743\u9650\u3002\u8003\u8651\u91cd\u5efa\u6216\u5220\u9664\u89c6\u56fe\u3002<\/span><\/p>\n<p><span style=\"font-size: 14px\"><strong><span style=\"color: #e53333\">\u3007 mysqldump: Couldnt execute show create table `$view_name`: Illegal mix of collations for operation UNION (1271)<\/span><\/strong><\/span><br \/><span style=\"font-size: 14px\"><br \/><strong><span style=\"color: #337fe5\">\u539f\u56e0\uff1a<\/span><\/strong><\/span><br \/><span style=\"font-size: 14px\">\u521b\u5efaview\u65f6\uff0c\u4f7f\u7528UNION\u65f6\u5b58\u5728\u975e\u6cd5\u7684\u6392\u5e8f\u89c4\u5219\u7ec4\u5408\u3002<br \/><\/span><span style=\"font-size: 14px;color: #337fe5\"><strong>\u5904\u7406\u601d\u8def\uff1a<\/strong><\/span><br \/><span style=\"font-size: 14px\">\u68c0\u67e5\u8be5\u89c6\u56fe\u5b9a\u4e49\uff0c\u68c0\u67e5\u5b57\u7b26\u96c6\uff0c\u8003\u8651\u91cd\u5efa\u6216\u5220\u9664\u89c6\u56fe\u3002<\/span><\/p>\n<p><span style=\"font-size: 14px\"><strong><span style=\"color: #e53333\">\u3007<\/span><\/strong><strong><span style=\"color: #e53333\"> mysqldump: Couldnt execute SHOW FIELDS FROM `$view_name`: The user specified as a definer ($user@$host) does not exist (1449)<\/span><\/strong><\/span><br \/><span style=\"font-size: 14px\"><strong><span style=\"color: #e53333\">\u3007 mysqldump: Couldnt execute show table status like $view_name: SELECT command denied to user @% for column $col_name in table $tb_name (1143)<\/span><\/strong><\/span><\/p>\n<p><span style=\"font-size: 14px;color: #337fe5\"><strong>\u539f\u56e0\uff1a<\/strong><\/span><br \/><span style=\"font-size: 14px\">\u8be5\u89c6\u56fe\u7684\u5b9a\u4e49\u8005$user@$host\u4e0d\u5b58\u5728\u3002<\/span><br \/><span style=\"font-size: 14px;color: #337fe5\"><strong>\u5904\u7406\u601d\u8def\uff1a<\/strong><\/span><br \/><span style=\"font-size: 14px\">\u68c0\u67e5mysql.user\u8868\uff0c\u786e\u8ba4\u7528\u6237\u662f\u5426\u5b58\u5728\uff0c\u8003\u8651\u91cd\u5efa\u6216\u5220\u9664\u89c6\u56fe\u3002<\/span><\/p>\n<p><span style=\"font-size: 14px\"><strong><span style=\"color: #e53333\">\u3007 Error: Couldnt read status information for table Income_config ()mysqldump: Couldnt execute show create table `Tser_table`: Table $db_name.test_table doesnt exist (1146)<\/span><\/strong><\/span><br \/><span style=\"font-size: 14px\"><strong><span style=\"color: #e53333\">\u3007 mysqldump: Got error: 1049: Unknown database $db_name when selecting the database<\/span><\/strong><\/span><\/p>\n<p><span style=\"font-size: 14px\"><strong><span style=\"color: #337fe5\">\u539f\u56e0\u4e00\uff1a<\/span><\/strong><\/span><br \/><span style=\"font-size: 14px\">\u4ecelower_case_table_names\u76840\u8bbe\u7f6e\u62101\uff0c\u5bfc\u81f4\u90e8\u5206\u539f\u6765\u542b\u6709\u5927\u5199\u5b57\u6bcd\u7684\u5e93\u8868&ldquo;\u627e\u4e0d\u5230&rdquo;\u3002<\/span><br \/><span style=\"font-size: 14px\"><strong><span style=\"color: #337fe5\">\u5904\u7406\u601d\u8def\uff1a<\/span><\/strong><\/span><br \/><span style=\"font-size: 14px\">\u5c06lower_case_table_names\u8bbe\u7f6e\u56de0\u3002<\/span><br \/><span style=\"font-size: 14px\">\u82e5\u6709\u5fc5\u987b\u5c06lower_case_table_names\u8bbe\u7f6e\u4e3a1\uff0c\u9700\u5148\u8bbe\u7f6e\u4e3a0\uff0c\u5e76\u5c06\u542b\u6709\u5927\u5199\u5b57\u6bcd\u7684\u5e93\u8868\u6539\u6210\u5c0f\u5199\uff0c\u518d\u8bbe\u7f6e\u4e3a1\u3002<\/span><\/p>\n<p><span style=\"font-size: 14px\"><strong><span style=\"color: #337fe5\">\u539f\u56e0\u4e8c\uff08MySQL 5.5\u53ca\u4ee5\u4e0b\u7248\u672c\u53ef\u80fd\u51fa\u73b0\uff09\uff1a<\/span><\/strong><\/span><br \/><span style=\"font-size: 14px\">\u8868\u635f\u574f\u5bfc\u81f4\u8be5\u8868\u627e\u4e0d\u5230\uff08InnoDB\uff09\u3002frm\u548cibd\u6587\u4ef6\u90fd\u5728\uff0c\u4f46\u65e0\u6cd5SHOW CREATE TABLE xxxG<\/span><br \/><span style=\"font-size: 14px\">error log\u4e00\u5219\uff1a<\/span><br \/><\/span><\/span><\/p>\n<div>\n<ol style=\"padding-bottom: 5px;padding-top: 5px;padding-left: 0pt;margin: 0px 1px 0px 0px;padding-right: 0pt\">\n<li><span style=\"color: #000000\">170820 17<span style=\"color: #0000cc\">:<\/span>43<span style=\"color: #0000cc\">:<\/span>17 <span style=\"color: #0000cc\">[<\/span>Note<span style=\"color: #0000cc\">]<\/span> Event Scheduler<span style=\"color: #0000cc\">:<\/span> scheduler thread started with id 1<br \/><\/span><\/li>\n<li>170820 17<span style=\"color: #0000cc\">:<\/span>44<span style=\"color: #0000cc\">:<\/span>48 InnoDB<span style=\"color: #0000cc\">:<\/span> error<span style=\"color: #0000cc\">:<\/span> space object <span style=\"color: #ff0000\">of<\/span> table <span style=\"color: #ff00ff\">&#8216;$db_name\/$tb_name&#8217;<\/span><span style=\"color: #0000cc\">,<\/span><\/li>\n<li>InnoDB<span style=\"color: #0000cc\">:<\/span> space id 4335 did <span style=\"color: #0000ff\">not<\/span> exist <span style=\"color: #0000ff\">in<\/span> memory<span style=\"color: #0000cc\">.<\/span> Retrying an open<span style=\"color: #0000cc\">.<\/span><\/li>\n<li>170820 17<span style=\"color: #0000cc\">:<\/span>44<span style=\"color: #0000cc\">:<\/span>48 InnoDB<span style=\"color: #0000cc\">:<\/span> Error<span style=\"color: #0000cc\">:<\/span> tablespace id <span style=\"color: #0000ff\">and<\/span> flags <span style=\"color: #0000ff\">in<\/span> file <span style=\"color: #ff00ff\">&#8216;.\/$db_name\/$tb_name.ibd&#8217;<\/span> are 0 <span style=\"color: #0000ff\">and<\/span> 0<span style=\"color: #0000cc\">,<\/span> but <span style=\"color: #0000ff\">in<\/span> the InnoDB<\/li>\n<li>InnoDB<span style=\"color: #0000cc\">:<\/span> data dictionary they are 4335 <span style=\"color: #0000ff\">and<\/span> 0<span style=\"color: #0000cc\">.<\/span><\/li>\n<li>InnoDB<span style=\"color: #0000cc\">:<\/span> Have you moved InnoDB <span style=\"color: #0000cc\">.<\/span>ibd files around without using the<\/li>\n<li>InnoDB<span style=\"color: #0000cc\">:<\/span> commands DISCARD TABLESPACE <span style=\"color: #0000ff\">and<\/span> IMPORT TABLESPACE<span style=\"color: #0000cc\">?<\/span><\/li>\n<li>InnoDB<span style=\"color: #0000cc\">:<\/span> Please refer to<\/li>\n<li>InnoDB<span style=\"color: #0000cc\">:<\/span> http<span style=\"color: #0000cc\">:<\/span><span style=\"color: #0000cc\">\/<\/span><span style=\"color: #0000cc\">\/<\/span>dev<span style=\"color: #0000cc\">.<\/span>mysql<span style=\"color: #0000cc\">.<\/span>com\/doc\/refman\/5<span style=\"color: #0000cc\">.<\/span>5\/en\/innodb<span style=\"color: #0000cc\">&#8211;<\/span>troubleshooting<span style=\"color: #0000cc\">&#8211;<\/span>datadict<span style=\"color: #0000cc\">.<\/span>html<\/li>\n<li>InnoDB<span style=\"color: #0000cc\">:<\/span> <span style=\"color: #0000ff\">for<\/span> how to resolve the issue<span style=\"color: #0000cc\">.<\/span><\/li>\n<li>170820 17<span style=\"color: #0000cc\">:<\/span>44<span style=\"color: #0000cc\">:<\/span>48 InnoDB<span style=\"color: #0000cc\">:<\/span> cannot calculate statistics <span style=\"color: #0000ff\">for<\/span> table $db_name\/$tb_name<\/li>\n<li>InnoDB<span style=\"color: #0000cc\">:<\/span> because the <span style=\"color: #0000cc\">.<\/span>ibd file is missing<span style=\"color: #0000cc\">.<\/span> <span style=\"color: #0000ff\">For<\/span> help<span style=\"color: #0000cc\">,<\/span> please refer to<\/li>\n<li>InnoDB<span style=\"color: #0000cc\">:<\/span> http<span style=\"color: #0000cc\">:<\/span><span style=\"color: #0000cc\">\/<\/span><span style=\"color: #0000cc\">\/<\/span>dev<span style=\"color: #0000cc\">.<\/span>mysql<span style=\"color: #0000cc\">.<\/span>com\/doc\/refman\/5<span style=\"color: #0000cc\">.<\/span>5\/en\/innodb<span style=\"color: #0000cc\">&#8211;<\/span>troubleshooting<span style=\"color: #0000cc\">.<\/span>html<\/li>\n<li>170820 17<span style=\"color: #0000cc\">:<\/span>44<span style=\"color: #0000cc\">:<\/span>48 <span style=\"color: #0000cc\">[<\/span>ERROR<span style=\"color: #0000cc\">]<\/span> MySQL is trying to open a table handle but the <span style=\"color: #0000cc\">.<\/span>ibd file <span style=\"color: #0000ff\">for<\/span><\/li>\n<li>table $db_name\/$tb_name does <span style=\"color: #0000ff\">not<\/span> exist<span style=\"color: #0000cc\">.<\/span><\/li>\n<li>Have you deleted the <span style=\"color: #0000cc\">.<\/span>ibd file from the database directory under<\/li>\n<li>the MySQL datadir<span style=\"color: #0000cc\">,<\/span> <span style=\"color: #0000ff\">or<\/span> have you used DISCARD TABLESPACE<span style=\"color: #0000cc\">?<\/span><\/li>\n<li>See http<span style=\"color: #0000cc\">:<\/span><span style=\"color: #0000cc\">\/<\/span><span style=\"color: #0000cc\">\/<\/span>dev<span style=\"color: #0000cc\">.<\/span>mysql<span style=\"color: #0000cc\">.<\/span>com\/doc\/refman\/5<span style=\"color: #0000cc\">.<\/span>5\/en\/innodb<span style=\"color: #0000cc\">&#8211;<\/span>troubleshooting<span style=\"color: #0000cc\">.<\/span>html<\/li>\n<li>how you can resolve the problem<span style=\"color: #0000cc\">.<\/span><\/li>\n<\/ol>\n<\/div>\n<p><span><span style=\"color: #0000ff\"><span style=\"font-size: 14px;color: #337fe5\"><strong>\u5904\u7406\u601d\u8def\uff1a<\/strong><\/span><br \/><span style=\"font-size: 14px\">\u4ece\u5b8c\u6574\u5907\u4efd+binlog\u8fd8\u539f\uff0c\u5bf9\u4e8e\u6709\u4e3b\u6216\u4ece\u7684\u5b9e\u4f8b\uff0c\u53ef\u901a\u8fc7\u7269\u7406\u5907\u4efd\u8fd8\u539f\u3002<\/span><\/p>\n<p><span style=\"font-size: 14px\"><span style=\"color: #e53333\"><strong>\u3007 mysqldump: Error 2020: Got packet bigger than max_allowed_packet bytes when dumping table `$tb_name` at row: xxxx<\/strong><\/span><\/span><\/p>\n<p><span style=\"font-size: 14px\"><strong><span style=\"color: #337fe5\">\u539f\u56e0\uff1a<\/span><\/strong><\/span><br \/><span style=\"font-size: 14px\">\u9ed8\u8ba4\u7684max_allowed_packet\u8fc7\u5c0f<\/span><br \/><span style=\"font-size: 14px\"><strong><span style=\"color: #337fe5\">\u5904\u7406\u601d\u8def\uff1a<\/span><\/strong><\/span><br \/><span style=\"font-size: 14px\">\u5728mysqldump\u65f6\u589e\u52a0max_allowed_packet\u7684\u5927\u5c0f\uff0c\u5982mysqldump &#8211;max-allowed-packet=268435456<\/span><\/p>\n<p><span style=\"font-size: 14px\"><strong><span style=\"color: #e53333\">\u3007 mysqldump: Error 1412: Table definition has changed, please retry transaction when dumping table `$tb_name` at row: 0<\/span><\/strong><\/span><\/p>\n<p><span style=\"font-size: 14px\"><span style=\"color: #337fe5\"><strong>\u539f\u56e0\uff1a<\/strong><\/span><\/span><br \/><span style=\"font-size: 14px\">\u5728\u5907\u4efd\u8be5\u8868\u65f6\uff0c\u8868\u5b9a\u4e49\u88ab\u4fee\u6539\u3002FLUSH TABLE WITH READ LOCK\u53ea\u4fdd\u8bc1\u6570\u636e\u4e00\u81f4\u6027\uff0c\u5e76\u4e0d\u4fdd\u8bc1schema\u4e0d\u88ab\u4fee\u6539\u3002<\/span><br \/><span style=\"font-size: 14px\"><strong><span style=\"color: #337fe5\">\u5904\u7406\u601d\u8def\uff1a<\/span><\/strong><\/span><br \/><span style=\"font-size: 14px\">\u5907\u4efd\u65f6\u671f\u4e0d\u505aDDL\u64cd\u4f5c\u3002<\/span><br \/><span style=\"font-size: 14px\"><strong><span style=\"color: #337fe5\">\u590d\u73b0\u4e00\uff1a<\/span><\/strong><\/span><br \/><\/span><\/span><\/p>\n<div>\n<ol style=\"padding-bottom: 5px;padding-top: 5px;padding-left: 0pt;margin: 0px 1px 0px 0px;padding-right: 0pt\">\n<li><span style=\"color: #000000\">\u2460 session1<span style=\"color: #0000cc\">&gt;<\/span> <span style=\"color: #0000ff\">CREATE<\/span> <span style=\"color: #0000ff\">TABLE<\/span> a <span style=\"color: #0000cc\">(<\/span>id <span style=\"color: #ff0000\">int<\/span><span style=\"color: #0000cc\">)<\/span> ENGINE<span style=\"color: #0000cc\">=<\/span>InnoDB<span style=\"color: #0000cc\">;<\/span><br \/><\/span><\/li>\n<li>\u2461 session2<span style=\"color: #0000cc\">&gt;<\/span> START TRANSACTION WITH CONSISTENT SNAPSHOT<span style=\"color: #0000cc\">;<\/span><\/li>\n<li>\u2462 session1<span style=\"color: #0000cc\">&gt;<\/span> ALTER <span style=\"color: #0000ff\">TABLE<\/span> a ADD COLUMN name <span style=\"color: #ff0000\">varchar<\/span><span style=\"color: #0000cc\">(<\/span>32<span style=\"color: #0000cc\">)<\/span><span style=\"color: #0000cc\">;<\/span><\/li>\n<li>\u2463 session2<span style=\"color: #0000cc\">&gt;<\/span> <span style=\"color: #0000ff\">SELECT<\/span> <span style=\"color: #0000cc\">*<\/span> <span style=\"color: #0000ff\">FROM<\/span> a<span style=\"color: #0000cc\">;<\/span><\/li>\n<li>ERROR 1412 <span style=\"color: #0000cc\">(<\/span>HY000<span style=\"color: #0000cc\">)<\/span><span style=\"color: #0000cc\">:<\/span> <span style=\"color: #0000ff\">Table<\/span> definition has changed<span style=\"color: #0000cc\">,<\/span> please retry transaction<\/li>\n<\/ol>\n<\/div>\n<p><span><span style=\"color: #0000ff\"><span style=\"font-size: 14px\">p.s. \u5982\u679c\u2462\u548c\u2463\u8c03\u6362\u987a\u5e8f\uff0c\u5219ALTER TABLE\u65e0\u6cd5\u6210\u529f\uff0c\u5219\u4f1a\u7b49\u5f85MDL\u3002<\/span><br \/><span style=\"font-size: 14px;color: #337fe5\"><strong>\u590d\u73b0\u4e8c\uff1a<\/strong><\/span><br \/><\/span><\/span><\/p>\n<div>\n<ol style=\"padding-bottom: 5px;padding-top: 5px;padding-left: 0pt;margin: 0px 1px 0px 0px;padding-right: 0pt\">\n<li><span style=\"color: #000000\">\u2460 session1<span style=\"color: #0000cc\">&gt;<\/span> START TRANSACTION WITH CONSISTENT SNAPSHOT<span style=\"color: #0000cc\">;<\/span><br \/><\/span><\/li>\n<li>\u2461 session2<span style=\"color: #0000cc\">&gt;<\/span> <span style=\"color: #0000ff\">CREATE<\/span> <span style=\"color: #0000ff\">TABLE<\/span> b <span style=\"color: #0000cc\">(<\/span>id <span style=\"color: #ff0000\">int<\/span><span style=\"color: #0000cc\">)<\/span> ENGINE<span style=\"color: #0000cc\">=<\/span>InnoDB<span style=\"color: #0000cc\">;<\/span><\/li>\n<li>\u2462 session1<span style=\"color: #0000cc\">&gt;<\/span> <span style=\"color: #0000ff\">SELECT<\/span> <span style=\"color: #0000cc\">*<\/span> <span style=\"color: #0000ff\">FROM<\/span> b<span style=\"color: #0000cc\">;<\/span><\/li>\n<li>ERROR 1412 <span style=\"color: #0000cc\">(<\/span>HY000<span style=\"color: #0000cc\">)<\/span><span style=\"color: #0000cc\">:<\/span> <span style=\"color: #0000ff\">Table<\/span> definition has changed<span style=\"color: #0000cc\">,<\/span> please retry transaction<\/li>\n<\/ol>\n<\/div>\n<p><span><span style=\"color: #0000ff\"><\/p>\n<p><span style=\"font-size: 14px\"><strong><span style=\"color: #e53333\">\u3007 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)<\/span><\/strong><\/span><\/p>\n<p><span style=\"font-size: 14px\"><strong><span style=\"color: #337fe5\">\u539f\u56e0\uff1a<\/span><\/strong><\/span><br \/><span style=\"font-size: 14px\">\u51fa\u73b0\u5728\u8868\u5f15\u64ce\u4e3aMERGE\u65f6\uff0c\u5907\u4efd\u5230\u8be5\u8868\u65f6\uff0c\u53d1\u73b0\u8be5\u8868\u5b9a\u4e49\u5b58\u5728\u95ee\u9898\u3002\u53ef\u80fdmerge\u7684\u8868\u4e0d\u5b58\u5728\uff0c\u6216\u8005\u8be5\u8868\u5408\u5e76\u7684\u57fa\u8868\u5305\u542b\u975eMyISAM\u5f15\u64ce\u7684\u8868\u3002<\/span><br \/><span style=\"font-size: 14px\"><strong><span style=\"color: #337fe5\">\u5904\u7406\u601d\u8def\uff1a<\/span><\/strong><\/span><br \/><span style=\"font-size: 14px\">\u5220\u9664\u6216\u8005\u91cd\u5efa\u8be5MERGE\u8868\u3002<\/span><br \/><span style=\"font-size: 14px\"><strong><span style=\"color: #337fe5\">\u590d\u73b0\u4e00\uff08merge\u8868\u4e2d\u5b9a\u4e49\u5305\u542b\u4e86\u975eMyISAM\u8868\uff09\uff1a<\/span><\/strong><\/span><br \/><\/span><\/span><\/p>\n<div>\n<ol style=\"padding-bottom: 5px;padding-top: 5px;padding-left: 0pt;margin: 0px 1px 0px 0px;padding-right: 0pt\">\n<li><span style=\"color: #000000\"><span style=\"color: #0000ff\">CREATE<\/span> <span style=\"color: #0000ff\">TABLE<\/span> t1<span style=\"color: #0000cc\">(<\/span>id <span style=\"color: #ff0000\">int<\/span><span style=\"color: #0000cc\">)<\/span> ENGINE<span style=\"color: #0000cc\">=<\/span>InnoDB<span style=\"color: #0000cc\">;<\/span><br \/><\/span><\/li>\n<li><span style=\"color: #0000ff\">CREATE<\/span> <span style=\"color: #0000ff\">TABLE<\/span> t2<span style=\"color: #0000cc\">(<\/span>id <span style=\"color: #ff0000\">int<\/span><span style=\"color: #0000cc\">)<\/span> ENGINE<span style=\"color: #0000cc\">=<\/span>MyISAM<span style=\"color: #0000cc\">;<\/span><\/li>\n<li><span style=\"color: #0000ff\">CREATE<\/span> <span style=\"color: #0000ff\">TABLE<\/span> merge_t<span style=\"color: #0000cc\">(<\/span>id <span style=\"color: #ff0000\">int<\/span><span style=\"color: #0000cc\">)<\/span>ENGINE<span style=\"color: #0000cc\">=<\/span>MERGE UNION<span style=\"color: #0000cc\">=<\/span><span style=\"color: #0000cc\">(<\/span>t1<span style=\"color: #0000cc\">,<\/span> t2<span style=\"color: #0000cc\">)<\/span><span style=\"color: #0000cc\">;<\/span><\/li>\n<li><span style=\"color: #0000ff\">SELECT<\/span> <span style=\"color: #0000cc\">*<\/span> <span style=\"color: #0000ff\">FROM<\/span> merge_t<span style=\"color: #0000cc\">;<\/span><\/li>\n<li>ERROR 1168 <span style=\"color: #0000cc\">(<\/span>HY000<span style=\"color: #0000cc\">)<\/span><span style=\"color: #0000cc\">:<\/span> Unable <span style=\"color: #0000ff\">to<\/span> open underlying <span style=\"color: #0000ff\">table<\/span> which <span style=\"color: #ff0000\">is<\/span> differently defined <span style=\"color: #ff0000\">or<\/span> of non-MyISAM type <span style=\"color: #ff0000\">or<\/span> doesn<span style=\"font-family: Consolas, monospace;white-space: normal;color: #5c5c5c;letter-spacing: 0px;background-color: #ffffff\">&#8216;t exist<\/span><\/li>\n<\/ol>\n<\/div>\n<p><span><span style=\"color: #0000ff\"><span style=\"font-size: 14px;color: #337fe5\"><strong>\u590d\u73b0\u4e8c\uff08\u8868\u4e0d\u5b58\u5728\uff09\uff1a<\/strong><\/span><br \/><\/span><\/span><\/p>\n<div>\n<ol style=\"padding-bottom: 5px;padding-top: 5px;padding-left: 0pt;margin: 0px 1px 0px 0px;padding-right: 0pt\">\n<li><span style=\"color: #000000\"><span style=\"color: #0000ff\">CREATE<\/span> <span style=\"color: #0000ff\">TABLE<\/span> t1<span style=\"color: #0000cc\">(<\/span>id <span style=\"color: #ff0000\">int<\/span><span style=\"color: #0000cc\">)<\/span> ENGINE<span style=\"color: #0000cc\">=<\/span>MyISAM<span style=\"color: #0000cc\">;<\/span><br \/><\/span><\/li>\n<li><span style=\"color: #0000ff\">CREATE<\/span> <span style=\"color: #0000ff\">TABLE<\/span> t2<span style=\"color: #0000cc\">(<\/span>id <span style=\"color: #ff0000\">int<\/span><span style=\"color: #0000cc\">)<\/span> ENGINE<span style=\"color: #0000cc\">=<\/span>MyISAM<span style=\"color: #0000cc\">;<\/span><\/li>\n<li><span style=\"color: #0000ff\">CREATE<\/span> <span style=\"color: #0000ff\">TABLE<\/span> merge_t<span style=\"color: #0000cc\">(<\/span>id <span style=\"color: #ff0000\">int<\/span><span style=\"color: #0000cc\">)<\/span>ENGINE<span style=\"color: #0000cc\">=<\/span>MERGE UNION<span style=\"color: #0000cc\">=<\/span><span style=\"color: #0000cc\">(<\/span>t1<span style=\"color: #0000cc\">,<\/span> t2<span style=\"color: #0000cc\">)<\/span><span style=\"color: #0000cc\">;<\/span><\/li>\n<li><span style=\"color: #0000ff\">SELECT<\/span> <span style=\"color: #0000cc\">*<\/span> <span style=\"color: #0000ff\">FROM<\/span> merge_t<span style=\"color: #0000cc\">;<\/span><\/li>\n<li>Empty <span style=\"color: #0000ff\">set<\/span> <span style=\"color: #0000cc\">(<\/span>0<span style=\"color: #0000cc\">.<\/span>00 sec<span style=\"color: #0000cc\">)<\/span>&nbsp; &nbsp; &#8212; \u6b63\u5e38\u8fd4\u56de<\/li>\n<li><span style=\"color: #0000ff\">DROP<\/span> <span style=\"color: #0000ff\">TABLE<\/span> t1<span style=\"color: #0000cc\">;<\/span><\/li>\n<li><span style=\"color: #0000ff\">SELECT<\/span> <span style=\"color: #0000cc\">*<\/span> <span style=\"color: #0000ff\">FROM<\/span> merge_t<span style=\"color: #0000cc\">;<\/span><\/li>\n<li>ERROR 1168 <span style=\"color: #0000cc\">(<\/span>HY000<span style=\"color: #0000cc\">)<\/span><span style=\"color: #0000cc\">:<\/span> Unable <span style=\"color: #0000ff\">to<\/span> open underlying <span style=\"color: #0000ff\">table<\/span> which <span style=\"color: #ff0000\">is<\/span> differently defined <span style=\"color: #ff0000\">or<\/span> of non-MyISAM type <span style=\"color: #ff0000\">or<\/span> doesn&#8217;t exist<\/li>\n<\/ol>\n<\/div>\n<p><span><span style=\"color: #0000ff\"><span style=\"font-size: 14px\"><strong><span style=\"color: #337fe5\">\u9644\u5f55\uff1a<\/span><\/strong><\/span><br \/><span style=\"font-size: 14px\">\u901a\u8fc7check table merge_t\u53ef\u4ee5\u68c0\u67e5\u662f\u54ea\u5f20\u8868\u6709\u95ee\u9898\uff0c\u5982\u6b64\u5904\u662ft1\uff1a<\/span><br \/><\/span><\/span><\/p>\n<div>\n<ol style=\"padding-bottom: 5px;padding-top: 5px;padding-left: 0pt;margin: 0px 1px 0px 0px;padding-right: 0pt\">\n<li><span style=\"color: #000000\"><span style=\"color: #0000cc\">[<\/span>15:20:12<span style=\"color: #0000cc\">]<\/span> root<span style=\"color: #0000ff\">@<\/span><span style=\"color: #008080\">localhost<\/span> <span style=\"color: #0000cc\">[<\/span>test<span style=\"color: #0000cc\">]<\/span><span style=\"color: #0000cc\">&gt;<\/span> check <span style=\"color: #0000ff\">table<\/span> merge_tG<br \/><\/span><\/li>\n<li><span style=\"color: #0000cc\">*<\/span><span style=\"color: #0000cc\">*<\/span><span style=\"color: #0000cc\">*<\/span><span style=\"color: #0000cc\">*<\/span><span style=\"color: #0000cc\">*<\/span><span style=\"color: #0000cc\">*<\/span><span style=\"color: #0000cc\">*<\/span><span style=\"color: #0000cc\">*<\/span><span style=\"color: #0000cc\">*<\/span><span style=\"color: #0000cc\">*<\/span><span style=\"color: #0000cc\">*<\/span><span style=\"color: #0000cc\">*<\/span><span style=\"color: #0000cc\">*<\/span><span style=\"color: #0000cc\">*<\/span><span style=\"color: #0000cc\">*<\/span><span style=\"color: #0000cc\">*<\/span><span style=\"color: #0000cc\">*<\/span><span style=\"color: #0000cc\">*<\/span><span style=\"color: #0000cc\">*<\/span><span style=\"color: #0000cc\">*<\/span><span style=\"color: #0000cc\">*<\/span><span style=\"color: #0000cc\">*<\/span><span style=\"color: #0000cc\">*<\/span><span style=\"color: #0000cc\">*<\/span><span style=\"color: #0000cc\">*<\/span><span style=\"color: #0000cc\">*<\/span><span style=\"color: #0000cc\">*<\/span> 1<span style=\"color: #0000cc\">.<\/span> row <span style=\"color: #0000cc\">*<\/span><span style=\"color: #0000cc\">*<\/span><span style=\"color: #0000cc\">*<\/span><span style=\"color: #0000cc\">*<\/span><span style=\"color: #0000cc\">*<\/span><span style=\"color: #0000cc\">*<\/span><span style=\"color: #0000cc\">*<\/span><span style=\"color: #0000cc\">*<\/span><span style=\"color: #0000cc\">*<\/span><span style=\"color: #0000cc\">*<\/span><span style=\"color: #0000cc\">*<\/span><span style=\"color: #0000cc\">*<\/span><span style=\"color: #0000cc\">*<\/span><span style=\"color: #0000cc\">*<\/span><span style=\"color: #0000cc\">*<\/span><span style=\"color: #0000cc\">*<\/span><span style=\"color: #0000cc\">*<\/span><span style=\"color: #0000cc\">*<\/span><span style=\"color: #0000cc\">*<\/span><span style=\"color: #0000cc\">*<\/span><span style=\"color: #0000cc\">*<\/span><span style=\"color: #0000cc\">*<\/span><span style=\"color: #0000cc\">*<\/span><span style=\"color: #0000cc\">*<\/span><span style=\"color: #0000cc\">*<\/span><span style=\"color: #0000cc\">*<\/span><span style=\"color: #0000cc\">*<\/span><\/li>\n<li>&nbsp; <span style=\"color: #0000ff\">Table<\/span><span style=\"color: #0000ff\">:<\/span> test<span style=\"color: #0000cc\">.<\/span>merge_t<\/li>\n<li>&nbsp; &nbsp; &nbsp;Op: check<\/li>\n<li>Msg_type: Error<\/li>\n<li>Msg_text: <span style=\"color: #0000ff\">Table<\/span> <span style=\"color: #ff00ff\">&#8216;test.t1&#8217;<\/span> <span style=\"color: #ff0000\">is<\/span> differently defined <span style=\"color: #ff0000\">or<\/span> of non-MyISAM type <span style=\"color: #ff0000\">or<\/span> doesn<span style=\"color: #ff00ff\">&#8216;t exist<br \/><\/span><\/li>\n<li>*************************** 2. row ***************************<\/li>\n<li>&nbsp; Table: test.merge_t<\/li>\n<li>&nbsp; &nbsp; &nbsp;Op: check<\/li>\n<li>Msg_type: Error<\/li>\n<li>Msg_text: Unable to open underlying table which is differently defined or of non-MyISAM type or doesn&#8217;t exist<\/li>\n<li><span style=\"color: #0000cc\">*<\/span><span style=\"color: #0000cc\">*<\/span><span style=\"color: #0000cc\">*<\/span><span style=\"color: #0000cc\">*<\/span><span style=\"color: #0000cc\">*<\/span><span style=\"color: #0000cc\">*<\/span><span style=\"color: #0000cc\">*<\/span><span style=\"color: #0000cc\">*<\/span><span style=\"color: #0000cc\">*<\/span><span style=\"color: #0000cc\">*<\/span><span style=\"color: #0000cc\">*<\/span><span style=\"color: #0000cc\">*<\/span><span style=\"color: #0000cc\">*<\/span><span style=\"color: #0000cc\">*<\/span><span style=\"color: #0000cc\">*<\/span><span style=\"color: #0000cc\">*<\/span><span style=\"color: #0000cc\">*<\/span><span style=\"color: #0000cc\">*<\/span><span style=\"color: #0000cc\">*<\/span><span style=\"color: #0000cc\">*<\/span><span style=\"color: #0000cc\">*<\/span><span style=\"color: #0000cc\">*<\/span><span style=\"color: #0000cc\">*<\/span><span style=\"color: #0000cc\">*<\/span><span style=\"color: #0000cc\">*<\/span><span style=\"color: #0000cc\">*<\/span><span style=\"color: #0000cc\">*<\/span> 3<span style=\"color: #0000cc\">.<\/span> row <span style=\"color: #0000cc\">*<\/span><span style=\"color: #0000cc\">*<\/span><span style=\"color: #0000cc\">*<\/span><span style=\"color: #0000cc\">*<\/span><span style=\"color: #0000cc\">*<\/span><span style=\"color: #0000cc\">*<\/span><span style=\"color: #0000cc\">*<\/span><span style=\"color: #0000cc\">*<\/span><span style=\"color: #0000cc\">*<\/span><span style=\"color: #0000cc\">*<\/span><span style=\"color: #0000cc\">*<\/span><span style=\"color: #0000cc\">*<\/span><span style=\"color: #0000cc\">*<\/span><span style=\"color: #0000cc\">*<\/span><span style=\"color: #0000cc\">*<\/span><span style=\"color: #0000cc\">*<\/span><span style=\"color: #0000cc\">*<\/span><span style=\"color: #0000cc\">*<\/span><span style=\"color: #0000cc\">*<\/span><span style=\"color: #0000cc\">*<\/span><span style=\"color: #0000cc\">*<\/span><span style=\"color: #0000cc\">*<\/span><span style=\"color: #0000cc\">*<\/span><span style=\"color: #0000cc\">*<\/span><span style=\"color: #0000cc\">*<\/span><span style=\"color: #0000cc\">*<\/span><span style=\"color: #0000cc\">*<\/span><\/li>\n<li>&nbsp; <span style=\"color: #0000ff\">Table<\/span><span style=\"color: #0000ff\">:<\/span> test<span style=\"color: #0000cc\">.<\/span>merge_t<\/li>\n<li>&nbsp; &nbsp; &nbsp;Op: check<\/li>\n<li>Msg_type: error<\/li>\n<li>Msg_text: Corrupt<\/li>\n<li>3 rows <span style=\"color: #0000ff\">in<\/span> <span style=\"color: #0000ff\">set<\/span> <span style=\"color: #0000cc\">(<\/span>0<span style=\"color: #0000cc\">.<\/span>00 sec<span style=\"color: #0000cc\">)<\/span><\/li>\n<\/ol>\n<\/div>\n<p><span><span style=\"color: #0000ff\"><span style=\"font-size: 14px\">\u901a\u8fc7cat\u8868MGR\u5b9a\u4e49\u7ed3\u6784\u6587\u4ef6\u53ef\u4ee5\u68c0\u67e5MERGE\u8868\u7684\u57fa\u8868\uff1a<\/span><br \/><\/span><\/span><\/p>\n<div>\n<ol style=\"padding-bottom: 5px;padding-top: 5px;padding-left: 0pt;margin: 0px 1px 0px 0px;padding-right: 0pt\">\n<li><span style=\"color: #000000\"><span style=\"color: #0000cc\">[<\/span>root@host <span style=\"color: #0000ff\">test<\/span><span style=\"color: #0000cc\">]<\/span><span style=\"color: #0000cc\">#<\/span> pwd<br \/><\/span><\/li>\n<li>\/data\/mysql<span style=\"color: #0000cc\">&#8211;<\/span>data\/mysql57\/data\/<span style=\"color: #0000ff\">test<\/span><\/li>\n<li><span style=\"color: #0000cc\">[<\/span>root@host <span style=\"color: #0000ff\">test<\/span><span style=\"color: #0000cc\">]<\/span><span style=\"color: #0000cc\">#<\/span> cat merge_t<span style=\"color: #0000cc\">.<\/span>MRG<\/li>\n<li>t1<\/li>\n<li>t2<\/li>\n<\/ol>\n<\/div>\n<p><span><span style=\"color: #0000ff\"><\/p>\n<p><span style=\"font-size: 14px\"><strong><span style=\"color: #e53333\">\u3007 mysqldump: Couldnt execute show create table `$tb_name`: Table .\/$db_name\/$tb_name is marked as crashed and last (automatic?) repair failed (144) <\/span><\/strong><\/span><br \/><span style=\"font-size: 14px\"><strong><span style=\"color: #e53333\">\u3007 mysqldump: Couldnt execute show create table `$tb_name`: Table .\/$db_name\/$tb_name is marked as crashed and should be repaired (145)<\/span><\/strong><\/span><br \/><span style=\"font-size: 14px\"><strong><span style=\"color: #e53333\">\u3007 mysqldump: Error 1194: Table throne_tower is marked as crashed and should be repaired when dumping table `$tb_name` at row: xxxxx<\/span><\/strong><\/span><\/p>\n<p><span style=\"font-size: 14px\"><strong><span style=\"color: #337fe5\">\u539f\u56e0\uff1a<\/span><\/strong><\/span><br \/><span style=\"font-size: 14px\">mysqldump\u5728\u62c9\u53d6\u8868\u5b9a\u4e49\u65f6\u62a5\u9519\uff0c\u8868\u635f\u574f\u3002<\/span><br \/><span style=\"font-size: 14px\"><strong><span style=\"color: #337fe5\">\u5904\u7406\u601d\u8def\uff1a<\/span><\/strong><\/span><br \/><span style=\"font-size: 14px\">\u8be5\u635f\u574f\u53d1\u751f\u5728\u975e\u4e8b\u52a1\u8868\u5982MyISAM\uff0c\u901a\u8fc7mysqlcheck\u6216\u8005repair table\u4fee\u590d\u5373\u53ef\u3002<\/span><\/p>\n<p><span style=\"font-size: 14px\"><strong><span style=\"color: #e53333\">\u3007 mysqldump: Couldnt execute SHOW FUNCTION STATUS WHERE Db = $db_name: Cannot load from mysql.$tb_name. The table is probably corrupted (1728)<\/span><\/strong><\/span><\/p>\n<p><span style=\"font-size: 14px\"><strong><span style=\"color: #337fe5\">\u539f\u56e0\uff1a<\/span><\/strong><\/span><br \/><span style=\"font-size: 14px\">\u5b57\u5178\u8868\u4e0d\u6b63\u786e\uff0c\u53ef\u80fd\u662f\u8868\u672c\u8eab\u635f\u574f\uff0c\u4e5f\u6709\u53ef\u80fd\u662f\u5bfc\u5165\u4e86\u5176\u4ed6\u7248\u672c\u7684mysql schema\u76d6\u6389\u4e86\u5b57\u5178\u8868\u3002<\/span><br \/><span style=\"font-size: 14px\"><strong><span style=\"color: #337fe5\">\u5904\u7406\u601d\u8def\uff1a<\/span><\/strong><\/span><br \/><span style=\"font-size: 14px\">repair table\u4fee\u590d\uff0c\u82e5\u4ecd\u65e0\u7528\uff0c\u5219\u53ef\u4ee5\u5c1d\u8bd5mysql_upgrade\u6765\u4fee\u590d\uff0c\u6216\u627e\u5230\u5bf9\u5e94\u7248\u672c\u7684mysql_system_tables_fix.sql\u6765\u5bfc\u5165\u3002<\/span><\/p>\n<p><span style=\"font-size: 14px;color: #e53333\"><span style=\"color: #e53333\"><strong>\u3007 mysqldump: Couldnt execute show events: Cannot proceed because system tables used by Event Scheduler were found damaged at server start (1577)<\/strong><\/span><\/span><\/p>\n<p><span style=\"font-size: 14px\"><strong><span style=\"color: #337fe5\">\u539f\u56e0\uff1a<\/span><\/strong><\/span><br \/><span style=\"font-size: 14px\">\u5b57\u5178\u8868\u4e0d\u6b63\u786e\uff0c\u6781\u5927\u53ef\u80fd\u662f\u5bfc\u5165\u4e86\u5176\u4ed6\u7248\u672c\u7684mysql schema\u76d6\u6389\u4e86\u5b57\u5178\u8868\u3002<\/span><br \/><span style=\"font-size: 14px\"><strong><span style=\"color: #337fe5\">\u5904\u7406\u601d\u8def\uff1a<\/span><\/strong><\/span><br \/><span style=\"font-size: 14px\">\u5c1d\u8bd5mysql_upgrade\u6765\u4fee\u590d\uff0c\u6216\u627e\u5230\u5bf9\u5e94\u7248\u672c\u7684mysql_system_tables_fix.sql\u6765\u5bfc\u5165\u3002\u8be5\u62a5\u9519\u53ef\u80fd\u5728upgrade\u64cd\u4f5c\u4e4b\u540e\u91cd\u542f\u5b9e\u4f8b\u3002<\/span><\/p>\n<p><span style=\"font-size: 14px\"><strong><span style=\"color: #e53333\">\u3007 mysqldump: Error: Got error 28 from storage engine when trying to dump tablespaces<\/span><\/strong><\/span><br \/><span style=\"font-size: 14px;color: #e53333\"><strong>mysqldump: Couldnt execute show fields from `$tb_name`: Got error 28 from storage engine (1030)<\/strong><\/span><\/p>\n<p><span style=\"font-size: 14px\"><strong><span style=\"color: #337fe5\">\u539f\u56e0\uff1a<\/span><\/strong><\/span><br \/><span style=\"font-size: 14px\">@@tmpdir\u6ee1\u4e86\u3002<\/span><br \/><span style=\"font-size: 14px\"><strong><span style=\"color: #337fe5\">\u5904\u7406\u601d\u8def\uff1a<\/span><\/strong><\/span><br \/><span style=\"font-size: 14px\">\u6e05\u9664@@tmpdir\uff0c\u53ef\u4ee5\u901a\u8fc7SELECT @@tmpdir;\u68c0\u67e5\u5177\u4f53\u76ee\u5f55\u3002<\/span><\/p>\n<p><span style=\"font-size: 14px\"><strong><span style=\"color: #e53333\">\u3007 mysqldump: Lost connection to MySQL server during query (2013) <\/span><\/strong><\/span><br \/><span style=\"font-size: 14px;color: #e53333\"><strong>ERROR 2002 (HY000): Can&#8217;t connect to local MySQL server through socket &#8216;@@socket&#8217; (111)<\/strong><\/span><\/p>\n<p><span style=\"font-size: 14px\"><strong><span style=\"color: #337fe5\">\u539f\u56e0\uff1a<\/span><\/strong><\/span><br \/><span style=\"font-size: 14px\">mysqldump\u6267\u884c\u8fc7\u7a0b\u4e2dmysqld\u88ab\u5173\u95ed\u3002<\/span><br \/><span style=\"font-size: 14px\"><strong><span style=\"color: #337fe5\">\u5904\u7406\u601d\u8def\uff1a<\/span><\/strong><\/span><br \/><span style=\"font-size: 14px\">\u68c0\u67e5mysqld\u88ab\u5173\u95ed\u7684\u539f\u56e0\uff0c\u4e00\u822c\u5e38\u89c1\u539f\u56e0\u662f\u53d1\u751fOOM\u3002<\/span><\/p>\n<p><span style=\"font-size: 14px\"><strong><span style=\"color: #e53333\">\u3007 mysqldump: Couldn&#8217;t execute &#8216;SHOW SLAVE STATUS&#8217;: Access denied; you need (at least one of) the SUPER, REPLICATION CLIENT privilege(s) for this operation (1227)<\/span><\/strong><\/span><\/p>\n<p><span style=\"font-size: 14px\"><span style=\"color: #337fe5\"><strong>\u539f\u56e0\uff1a<\/strong><\/span><\/span><br \/><span style=\"font-size: 14px\">mysqldump\u52a0\u4e86&#8211;dump-slave\u53c2\u6570\uff0c\u7f3a\u5c11SUPER\u6216REPLICATION CLIENT\u6765\u6267\u884cSHOW SLAVE STATUS\u3002<\/span><br \/><span style=\"font-size: 14px;color: #337fe5\"><strong>\u5904\u7406\u601d\u8def\uff1a<\/strong><\/span><br \/><span style=\"font-size: 14px\">\u68c0\u67e5mysqldump\u7684\u7528\u6237\u6743\u9650\u3002<\/span><\/p>\n<p><span style=\"font-size: 14px\"><strong><span style=\"color: #e53333\">\u3007 mysqldump: Couldn&#8217;t execute &#8216;STOP SLAVE SQL_THREAD&#8217;: Access denied for user &#8216;dump&#8217;@&#8217;localhost&#8217; (using password: YES) (1045)<\/span><\/strong><\/span><\/p>\n<p><span style=\"font-size: 14px\"><strong><span style=\"color: #337fe5\">\u539f\u56e0\uff1a<\/span><\/strong><\/span><br \/><span style=\"font-size: 14px\">mysqldump\u52a0\u4e86&#8211;dump-slave\u53c2\u6570\uff0c\u7f3a\u5c11SUPER\u6743\u9650\u4f7f\u7528STOP SLAVE SQL_THREAD\u3002<\/span><br \/><span style=\"font-size: 14px\"><strong><span style=\"color: #337fe5\">\u5904\u7406\u601d\u8def\uff1a<\/span><\/strong><\/span><br \/><span style=\"font-size: 14px\">\u68c0\u67e5mysqldump\u7684\u7528\u6237\u6743\u9650\u3002<br \/><\/span><\/span><\/span><\/p>\n<p><span style=\"font-size: small\">\u672c\u6587\u6c38\u4e45\u66f4\u65b0\u94fe\u63a5\u5730\u5740<\/span>\uff1ahttp:\/\/www.linuxidc.com\/Linux\/2018-01\/15069.htm<\/p>\n<p><a href=\"https:\/\/www.dongwubaike.cn\/fanhao\/wp-content\/uploads\/2024\/06\/hao2022223232.jpg\" data-fancybox=\"images\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.dongwubaike.cn\/fanhao\/wp-content\/uploads\/2024\/06\/hao2022223232.jpg\" width=\"15\" height=\"17\" alt=\"mysqldump\u5907\u4efd\u5931\u8d25\u4ee5\u53ca\u89e3\u51b3\u65b9\u6cd5\u6c47\u603b\" \/><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>MySQLdump\u5907\u4efd\u5931\u8d25\u4ee5\u53ca\u89e3\u51b3\u65b9\u6cd5\u6c47\u603b   \u3007 mysqldump: Error: Query execution was interrupted, maximum statement execution time exceeded when trying to dump tablespaces<br \/>\n\u3007 mysqldump: Error 3024: Query execution was interrupted, maximum statement execution time exceeded when dumping table `$tb_name` at row: xxxx <\/p>\n<p>\u7248\u672c\uff1a<br \/>\nMySQL 5.7.8+<br \/>\n\u539f\u56e0\uff1a<br \/>\nmax_execution_time\u8fc7\u5c0f<br \/>\n\u5904\u7406\u601d\u8def\uff1a<br \/>\n\u2460 \u901a\u8fc7hints\uff0c\u589e\u5927N\u503c\uff08\u6587\u6863\u8bf4\uff0c\u5728hints\u7528\u6cd5\u4e2d\uff0c\u5c06N\u6539\u4e3a0\u4e3a\u65e0\u9650\u5236\uff0c\u4f46\u6211\u6d4b\u4e0b\u6765\u4e0d\u751f\u6548\uff0c\u53ef\u8bbe\u7f6e\u6210\u4e00\u4e2a\u8f83\u5927\u503c\u5982999999\u89e3\u51b3\uff09<br \/>\nSELECT \/*+ MAX_EXECUTION_TIME(N) *\/ * FROM t1 LIMIT 100000;<br \/>\n\u2461 \u4fee\u6539max_execution_time\u503c\uff0c\u5c06\u8be5\u503c\u8bbe\u7f6e\u4e3a\u8f83\u5927\u4e00\u4e2a\u503c\uff0c\u6216\u8bbe\u7f6e\u4e3a0\uff08\u4e0d\u9650\u5236\uff09<br \/>\n\u9644\u5f55\uff1a<br \/>\n\u8be5\u53c2\u65705.7.8\u88ab\u6dfb\u52a0\uff0c\u5355\u4f4d\u4e3ams\uff0c\u52a8\u6001\u53c2\u6570\uff0c\u9ed8\u8ba4\u4e3a0\uff0c\u8bbe\u7f6e\u4e3a0\u65f6\u610f\u5473\u7740SELECT\u8d85\u65f6\u4e0d\u88ab\u8bbe\u7f6e\uff08\u4e0d\u9650\u5236\u8d85\u65f6\u65f6\u95f4\uff09\u3002\u4e0d\u4f5c\u7528\u4e8e\u5b58\u50a8\u8fc7\u7a0b\u4e2d\u7684SELECT\u8bed\u53e5\uff0c\u5e76\u4e14\u53ea\u4f5c\u7528\u4e8e\u53ea\u8bfb\u7684SELECT\uff0c\u5982INSERT &#8230; SELECT &#8230; \u662f\u4e0d\u88ab\u4f5c\u7528\u7684\u3002<br \/>\nfor more information:<br \/>\nhttp:\/\/blog.itpub.net\/29773961\/viewspace-2150443\/ <\/p>\n<p>\u3007 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)  <\/p>\n<p>\u539f\u56e0\uff1a<br \/>\n\u8be5view\u5f15\u7528\u4e86\u65e0\u6548\u7684\u8868\uff0c\u5217\uff0c\u51fd\u6570\u6216\u8005\u5b9a\u4e49\u8005\u3002<br \/>\n\u5904\u7406\u601d\u8def\uff1a<br \/>\n\u53ef\u4ee5\u6839\u636e\u62a5\u9519\u4fe1\u606f\uff0c\u8fdb\u5165db\uff0c\u6267\u884cSHOW CREATE VIEW $view_nameG\uff0c\u67e5\u770b\u8be5view\u7684\u5b9a\u4e49\uff0c\u9010\u4e00\u68c0\u67e5\u8be5view\u7684\u57fa\u8868\uff0c\u5217\uff0c\u6216\u76f8\u5173\u51fd\u6570\u4e0e\u7528\u6237\u662f\u5426\u5177\u6709\u76f8\u5173\u6743\u9650\u3002\u8003\u8651\u91cd\u5efa\u6216\u5220\u9664\u89c6\u56fe\u3002 <\/p>\n<p>\u3007 mysqldump: Couldnt execute show create table `$view_name`: Illegal mix of collations for operation UNION (1271)  <\/p>\n<p>\u539f\u56e0\uff1a<br \/>\n\u521b\u5efaview\u65f6\uff0c\u4f7f\u7528UNION\u65f6\u5b58\u5728\u975e\u6cd5\u7684\u6392\u5e8f\u89c4\u5219\u7ec4\u5408\u3002<br \/>\n \u5904\u7406\u601d\u8def\uff1a<br \/>\n\u68c0\u67e5\u8be5\u89c6\u56fe\u5b9a\u4e49\uff0c\u68c0\u67e5\u5b57\u7b26\u96c6\uff0c\u8003\u8651\u91cd\u5efa\u6216\u5220\u9664\u89c6\u56fe\u3002 <\/p>\n<p>\u3007  mysqldump: Couldnt execute SHOW FIELDS FROM `$view_name`: The user specified as a definer ($user@$host) does not exist (1449)<br \/>\n\u3007 mysqldump: Couldnt execute show table status like $view_name: SELECT command denied to user @% for column $col_name in table $tb_name (1143)  <\/p>\n<p>\u539f\u56e0\uff1a<br \/>\n\u8be5\u89c6\u56fe\u7684\u5b9a\u4e49\u8005$user@$host\u4e0d\u5b58\u5728\u3002<br \/>\n\u5904\u7406\u601d\u8def\uff1a<br \/>\n\u68c0\u67e5mysql.user\u8868\uff0c\u786e\u8ba4\u7528\u6237\u662f\u5426\u5b58\u5728\uff0c\u8003\u8651\u91cd\u5efa\u6216\u5220\u9664\u89c6\u56fe\u3002 <\/p>\n<p>\u3007 Error: Couldnt read status information for table Income_config ()mysqldump: Couldnt execute show create table `Tser_table`: Table $db_name.test_table doesnt exist (1146)<br \/>\n\u3007 mysqldump: Got error: 1049: Unknown database $db_name when selecting the database  <\/p>\n<p>\u539f\u56e0\u4e00\uff1a<br \/>\n\u4ecelower_case_table_names\u76840\u8bbe\u7f6e\u62101\uff0c\u5bfc\u81f4\u90e8\u5206\u539f\u6765\u542b\u6709\u5927\u5199\u5b57\u6bcd\u7684\u5e93\u8868&ldquo;\u627e\u4e0d\u5230&rdquo;\u3002<br \/>\n\u5904\u7406\u601d\u8def\uff1a<br \/>\n\u5c06lower_case_table_names\u8bbe\u7f6e\u56de0\u3002<br \/>\n\u82e5\u6709\u5fc5\u987b\u5c06lower_case_table_names\u8bbe\u7f6e\u4e3a1\uff0c\u9700\u5148\u8bbe\u7f6e\u4e3a0\uff0c\u5e76\u5c06\u542b\u6709\u5927\u5199\u5b57\u6bcd\u7684\u5e93\u8868\u6539\u6210\u5c0f\u5199\uff0c\u518d\u8bbe\u7f6e\u4e3a1\u3002 <\/p>\n<p>\u539f\u56e0\u4e8c\uff08MySQL 5.5\u53ca\u4ee5\u4e0b\u7248\u672c\u53ef\u80fd\u51fa\u73b0\uff09\uff1a<br \/>\n\u8868\u635f\u574f\u5bfc\u81f4\u8be5\u8868\u627e\u4e0d\u5230\uff08InnoDB\uff09\u3002frm\u548cibd\u6587\u4ef6\u90fd\u5728\uff0c\u4f46\u65e0\u6cd5SHOW CREATE TABLE xxxG<br \/>\nerror log\u4e00\u5219\uff1a<\/p>\n","protected":false},"author":2,"featured_media":209791,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-209794","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry"],"_links":{"self":[{"href":"https:\/\/www.dongwubaike.cn\/fanhao\/wp-json\/wp\/v2\/posts\/209794","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.dongwubaike.cn\/fanhao\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.dongwubaike.cn\/fanhao\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.dongwubaike.cn\/fanhao\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.dongwubaike.cn\/fanhao\/wp-json\/wp\/v2\/comments?post=209794"}],"version-history":[{"count":1,"href":"https:\/\/www.dongwubaike.cn\/fanhao\/wp-json\/wp\/v2\/posts\/209794\/revisions"}],"predecessor-version":[{"id":308300,"href":"https:\/\/www.dongwubaike.cn\/fanhao\/wp-json\/wp\/v2\/posts\/209794\/revisions\/308300"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.dongwubaike.cn\/fanhao\/wp-json\/wp\/v2\/media\/209791"}],"wp:attachment":[{"href":"https:\/\/www.dongwubaike.cn\/fanhao\/wp-json\/wp\/v2\/media?parent=209794"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.dongwubaike.cn\/fanhao\/wp-json\/wp\/v2\/categories?post=209794"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.dongwubaike.cn\/fanhao\/wp-json\/wp\/v2\/tags?post=209794"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}