{"id":587,"date":"2017-08-09T13:35:23","date_gmt":"2017-08-09T13:35:23","guid":{"rendered":"http:\/\/766ebcd59621e305170616ba3d3dac32"},"modified":"2017-09-21T15:47:49","modified_gmt":"2017-09-21T07:47:49","slug":"mysqldump-error","status":"publish","type":"post","link":"https:\/\/www.xiaobo.li\/notes\/archives\/587","title":{"rendered":"mysqldump error"},"content":{"rendered":"<p><span style=\"font-size:14px;\">mysqldump\u5907\u4efd\u6709\u65f6\u62a5\u9519\u4e86\uff0c\u5185\u5bb9\u5982\u4e0b\uff1a<\/span><\/p>\n<p><span style=\"font-size:14px;\">mysql@localhost mysql]$ mysqldump --single-transaction -A -uroot -proot123 --master-data=2 &gt; \/u01\/backup\/testbk.sql<\/span><br \/>\n<span style=\"font-size:14px;\">Warning: Using a password on the command line interface can be insecure.<\/span><br \/>\n<span style=\"font-size:14px;\">Error: Couldn't read status information for table slave_master_info ()<\/span><br \/>\n<span style=\"font-size:14px;\">mysqldump: Couldn't execute 'show create table `slave_master_info`': Table 'mysql.slave_master_info' doesn't exist (1146)<\/span><\/p>\n<p><span style=\"font-size:14px;\">\u9519\u8bef\u63d0\u793a\u6709innodb_index_stats,innodb_table_stats,slave_master_info,slave_relay_log_info,slave_worker_info\u7b49\u51e0\u4e2a<\/span><br \/>\n<span style=\"font-size:14px;\">\u4f7f\u7528select\u8bed\u53e5\u8fdb\u884c\u67e5\u8be2\u65f6\uff0c\u4e5f\u4f1a\u63d0\u793a\u8fd9\u4e9b\u8868\u4e0d\u5b58\u5728<\/span><\/p>\n<p><span style=\"font-size:14px;\">\u6700\u7ec8\u89e3\u51b3\u65b9\u6cd5\u662f\uff1a\u5220\u9664\u9519\u8bef\u7684\u8868\u540e\u91cd\u5efa<\/span><\/p>\n<p><span style=\"font-size:14px;\">1.\u67e5\u8be2\u4e0d\u53ef\u4f7f\u7528\u7684\u8868<\/span><br \/>\n<span style=\"font-size:14px;\">show create table mysql.innodb_index_stats;<\/span><br \/>\n<span style=\"font-size:14px;\">show create table mysql.innodb_table_stats;<\/span><br \/>\n<span style=\"font-size:14px;\">show create table mysql.slave_master_info;<\/span><br \/>\n<span style=\"font-size:14px;\">show create table mysql.slave_relay_log_info;<\/span><br \/>\n<span style=\"font-size:14px;\">show create table mysql.slave_worker_info;<\/span><\/p>\n<p>\n<span style=\"font-size:14px;\">2.\u5220\u9664\u4e0a\u8ff05\u5f20\u8868\u6216\u6709\u9519\u8bef\u7684\u8868<\/span><br \/>\n<span style=\"font-size:14px;\">drop table mysql.innodb_index_stats;<\/span><br \/>\n<span style=\"font-size:14px;\">drop table mysql.innodb_table_stats;<\/span><br \/>\n<span style=\"font-size:14px;\">drop table mysql.slave_master_info;<\/span><br \/>\n<span style=\"font-size:14px;\">drop table mysql.slave_relay_log_info;<\/span><br \/>\n<span style=\"font-size:14px;\">drop table mysql.slave_worker_info;<\/span><\/p>\n<p><span style=\"font-size:14px;\">3.\u8fdb\u5165data\/mysql\u76f8\u5e94\u6587\u4ef6\u5939\u627e\u5230\u5173\u4e8e5\u5f20\u8868\u7684\u6570\u636e\u6587\u4ef6\uff08.frm,.ibd)\u5e76\u5220\u9664<\/span><br \/>\n<span style=\"font-size:14px;\">rm -rf innodb_index_stats.*<\/span><br \/>\n<span style=\"font-size:14px;\">rm -rf innodb_table_stats.*<\/span><br \/>\n<span style=\"font-size:14px;\">rm -rf slave_master_info.*<\/span><br \/>\n<span style=\"font-size:14px;\">rm -rf slave_relay_log_info.*<\/span><br \/>\n<span style=\"font-size:14px;\">rm -rf slave_worker_info.*<\/span><\/p>\n<p><span style=\"font-size:14px;\">4. \u67e5\u627e\u8868\u7ed3\u6784<\/span><br \/>\n<span style=\"font-size:14px;\">\u53bb\u627e$MYSQL_HOME\/share\/mysql_system_tables.sql\uff0c\u5206\u522bsearch\u5230\u6bcf\u4e00\u8868\u7684\u5efa\u8868\u8bed\u53e5\uff0c\u7136\u540e\u91cd\u5efa\u8bbe\uff1b<\/p>\n<p>\n<\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p><span style=\"font-size:14px;\">mysqldump\u5907\u4efd\u6709\u65f6\u62a5\u9519\u4e86\uff0c\u5185\u5bb9\u5982\u4e0b\uff1a<\/span><\/p>\n<p><span style=\"font-size:14px;\">mysql@localhost mysql]$ mysqldump --single-transaction -A -uroot -proot123 --master-data=2 &gt; \/u01\/backup\/testbk.sql<\/span><br \/>\n<span style=\"font-size:14px;\">Warning: Using a password on the command line interface can be insecure.<\/span><br \/>\n<span style=\"font-size:14px;\">Error: Couldn't read status information for table slave_master_info ()<\/span><br \/>\n<span style=\"font-size:14px;\">mysqldump: Couldn't execute 'show create table `slave_master_info`': Table 'mysql.slave_master_info' doesn't exist (1146)<\/span><\/p>\n<p><span style=\"font-size:14px;\">\u9519\u8bef\u63d0\u793a\u6709innodb_index_stats,innodb_table_stats,slave_master_info,slave_relay_log_info,slave_worker_info\u7b49\u51e0\u4e2a<\/span><br \/>\n<span style=\"font-size:14px;\">\u4f7f\u7528select\u8bed\u53e5\u8fdb\u884c\u67e5\u8be2\u65f6\uff0c\u4e5f\u4f1a\u63d0\u793a\u8fd9\u4e9b\u8868\u4e0d\u5b58\u5728<\/span><\/p>\n<p><span style=\"font-size:14px;\">\u6700\u7ec8\u89e3\u51b3\u65b9\u6cd5\u662f\uff1a\u5220\u9664\u9519\u8bef\u7684\u8868\u540e\u91cd\u5efa<\/span><\/p>\n<p><span style=\"font-size:14px;\">1.\u67e5\u8be2\u4e0d\u53ef\u4f7f\u7528\u7684\u8868<\/span><br \/>\n<span style=\"font-size:14px;\">show create table mysql.innodb_index_stats;<\/span><br \/>\n<span style=\"font-size:14px;\">show create table mysql.innodb_table_stats;<\/span><br \/>\n<span style=\"font-size:14px;\">show create table mysql.slave_master_info;<\/span><br \/>\n<span style=\"font-size:14px;\">show create table mysql.slave_relay_log_info;<\/span><br \/>\n<span style=\"font-size:14px;\">show create table mysql.slave_worker_info;<\/span><\/p>\n<p>\n<span style=\"font-size:14px;\">2.\u5220\u9664\u4e0a\u8ff05\u5f20\u8868\u6216\u6709\u9519\u8bef\u7684\u8868<\/span><br \/>\n<span style=\"font-size:14px;\">drop table mysql.innodb_index_stats;<\/span><br \/>\n<span style=\"font-size:14px;\">drop table mysql.innodb_table_stats;<\/span><br \/>\n<span style=\"font-size:14px;\">drop table mysql.slave_master_info;<\/span><br \/>\n<span style=\"font-size:14px;\">drop table mysql.slave_relay_log_info;<\/span><br \/>\n<span style=\"font-size:14px;\">drop table mysql.slave_worker_info;<\/span><\/p>\n<p><span style=\"font-size:14px;\">3.\u8fdb\u5165data\/mysql\u76f8\u5e94\u6587\u4ef6\u5939\u627e\u5230\u5173\u4e8e5\u5f20\u8868\u7684\u6570\u636e\u6587\u4ef6\uff08.frm,.ibd)\u5e76\u5220\u9664<\/span><br \/>\n<span style=\"font-size:14px;\">rm -rf innodb_index_stats.*<\/span><br \/>\n<span style=\"font-size:14px;\">rm -rf innodb_table_stats.*<\/span><br \/>\n<span style=\"font-size:14px;\">rm -rf slave_master_info.*<\/span><br \/>\n<span style=\"font-size:14px;\">rm -rf slave_relay_log_info.*<\/span><br \/>\n<span style=\"font-size:14px;\">rm -rf slave_worker_info.*<\/span><\/p>\n<p><span style=\"font-size:14px;\">4. \u67e5\u627e\u8868\u7ed3\u6784<\/span><br \/>\n<span style=\"font-size:14px;\">\u53bb\u627e$MYSQL_HOME\/share\/mysql_system_tables.sql\uff0c\u5206\u522bsearch\u5230\u6bcf\u4e00\u8868\u7684\u5efa\u8868\u8bed\u53e5\uff0c\u7136\u540e\u91cd\u5efa\u8bbe\uff1b<\/p>\n<p>\n<\/span> <a href=\"https:\/\/www.xiaobo.li\/notes\/archives\/587\">\u7ee7\u7eed\u9605\u8bfb <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[288],"tags":[2,270],"class_list":["post-587","post","type-post","status-publish","format-standard","hentry","category-db","tag-MySQL","tag-mysqldump"],"_links":{"self":[{"href":"https:\/\/www.xiaobo.li\/notes\/wp-json\/wp\/v2\/posts\/587","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.xiaobo.li\/notes\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.xiaobo.li\/notes\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.xiaobo.li\/notes\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.xiaobo.li\/notes\/wp-json\/wp\/v2\/comments?post=587"}],"version-history":[{"count":0,"href":"https:\/\/www.xiaobo.li\/notes\/wp-json\/wp\/v2\/posts\/587\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.xiaobo.li\/notes\/wp-json\/wp\/v2\/media?parent=587"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.xiaobo.li\/notes\/wp-json\/wp\/v2\/categories?post=587"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.xiaobo.li\/notes\/wp-json\/wp\/v2\/tags?post=587"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}