MySQL根据ibd恢复数据


mysql不小心卸载后,重装mysql,从原数据库目录下的idb文件恢复最新数据
先解绑数据文件
alter table cg_daohuo discard tablespace;
alter table cg_daohuos discard tablespace;
alter table cg_dingdan discard tablespace;
alter table cg_dingdans discard tablespace;
alter table cg_jihua discard tablespace;
alter table cg_jihuas discard tablespace;
alter table cl_baoxian discard tablespace;
alter table cl_baoyang discard tablespace;
alter table cl_cheliang discard tablespace;
alter table cl_gps discard tablespace;
alter table cl_jiayou discard tablespace;
alter table cl_nianjian discard tablespace;
alter table cl_weixiu discard tablespace;
alter table cl_weizhang discard tablespace;
alter table cms_news discard tablespace;
alter table cpp_banchengpin discard tablespace;
alter table cpp_chengpin discard tablespace;
alter table cpp_dafenqiezongjie discard tablespace;
alter table cpp_fenqiezhiling discard tablespace;
alter table cpp_fenqiezhilings discard tablespace;
alter table cpp_fhprint_temp discard tablespace;
alter table cpp_liuyanzhiling discard tablespace;
alter table cpp_liuyanzongjie discard tablespace;
alter table cpp_xiaofenqiezhiling discard tablespace;
alter table cpp_xiaofenqiezhilings discard tablespace;
alter table cpp_xiaofenqiezongjie discard tablespace;
alter table cw_accdetail discard tablespace;
alter table cw_accvouch discard tablespace;
alter table cw_accvouchs discard tablespace;
alter table cw_beiyongjin discard tablespace;
alter table cw_fapiaocg discard tablespace;
alter table cw_fapiaocghx discard tablespace;
alter table cw_fapiaodikou discard tablespace;
alter table cw_fapiaoxs discard tablespace;
alter table cw_fukuan discard tablespace;
alter table cw_fukuans discard tablespace;
alter table cw_fukuanshenqing discard tablespace;
alter table cw_kehujizhang discard tablespace;
alter table cw_qiantiao discard tablespace;
alter table cw_shoukuan discard tablespace;
alter table cw_shoukuans discard tablespace;
alter table fgc_us_iz8vbd58xvta2gz discard tablespace;
alter table fgc_us_izg52u5cmjgmikz discard tablespace;
alter table fgc_us_jgsl discard tablespace;
alter table fgc_us_s_iz8vbd58xvta2gz discard tablespace;
alter table file_info discard tablespace;
alter table flow discard tablespace;
alter table flow_doc discard tablespace;
alter table flow_todo discard tablespace;
alter table flowmember discard tablespace;
alter table flowstep discard tablespace;
alter table kc_currstock discard tablespace;
alter table kc_log discard tablespace;
alter table kc_pandian discard tablespace;
alter table kc_pandians discard tablespace;
alter table kc_stockin discard tablespace;
alter table kc_stockins discard tablespace;
alter table kc_stockout discard tablespace;
alter table kc_stockouts discard tablespace;
alter table kc_stocktran discard tablespace;
alter table kc_stocktrans discard tablespace;
alter table kc_tongzhi discard tablespace;
alter table kc_tongzhis discard tablespace;
alter table ks_jiage discard tablespace;
alter table ks_sushe discard tablespace;
alter table ks_sushes discard tablespace;
alter table pm_wenti discard tablespace;
alter table qrtz_blob_triggers discard tablespace;
alter table qrtz_calendars discard tablespace;
alter table qrtz_cron_triggers discard tablespace;
alter table qrtz_fired_triggers discard tablespace;
alter table qrtz_job_details discard tablespace;
alter table qrtz_locks discard tablespace;
alter table qrtz_paused_trigger_grps discard tablespace;
alter table qrtz_scheduler_state discard tablespace;
alter table qrtz_simple_triggers discard tablespace;
alter table qrtz_simprop_triggers discard tablespace;
alter table qrtz_triggers discard tablespace;
alter table sc_banliao discard tablespace;
alter table sc_banliaos discard tablespace;
alter table sc_banzu discard tablespace;
alter table sc_banzus discard tablespace;
alter table sc_gongzi discard tablespace;
alter table sc_gongzibz discard tablespace;
alter table sc_gongzis discard tablespace;
alter table sc_guanxinkou discard tablespace;
alter table sc_jiangcheng discard tablespace;
alter table sc_jihua discard tablespace;
alter table sc_jihuas discard tablespace;
alter table sc_jiliang discard tablespace;
alter table sc_jizu discard tablespace;
alter table sc_jizus discard tablespace;
alter table sc_liaocang discard tablespace;
alter table sc_peifang discard tablespace;
alter table sc_peifangs discard tablespace;
alter table sc_renwu discard tablespace;
alter table sc_renwubz discard tablespace;
alter table sc_renwujz discard tablespace;
alter table sc_renwuliao discard tablespace;
alter table sc_renwus discard tablespace;
alter table sc_yibiao discard tablespace;
alter table sm_jiage discard tablespace;
alter table smkc discard tablespace;
alter table sys_logs discard tablespace;
alter table sys_params discard tablespace;
alter table sys_permission discard tablespace;
alter table sys_role discard tablespace;
alter table sys_role_permission discard tablespace;
alter table sys_role_user discard tablespace;
alter table sys_user discard tablespace;
alter table t_acccode discard tablespace;
alter table t_billcode discard tablespace;
alter table t_customer discard tablespace;
alter table t_customerclass discard tablespace;
alter table t_dept discard tablespace;
alter table t_dict discard tablespace;
alter table t_inv discard tablespace;
alter table t_invclass discard tablespace;
alter table t_job discard tablespace;
alter table t_mail discard tablespace;
alter table t_mail_to discard tablespace;
alter table t_notice discard tablespace;
alter table t_notice_read discard tablespace;
alter table t_person discard tablespace;
alter table t_position discard tablespace;
alter table t_pushmsg discard tablespace;
alter table t_token discard tablespace;
alter table t_txl discard tablespace;
alter table t_vendor discard tablespace;
alter table t_vendorclass discard tablespace;
alter table test discard tablespace;
alter table u8_accass discard tablespace;
alter table u8_accsum discard tablespace;
alter table u8_accvouch discard tablespace;
alter table u8_accvouch2 discard tablespace;
alter table xs_dingdan discard tablespace;
alter table xs_dingdans discard tablespace;
alter table xs_fahuo discard tablespace;
alter table xs_fahuos discard tablespace;
alter table xs_hetong discard tablespace;
alter table xs_hetongs discard tablespace;
alter table xs_paiche discard tablespace;
alter table xs_paiches discard tablespace;
alter table xs_tuihuojian discard tablespace;
alter table xs_zhuangche discard tablespace;
alter table xs_zhuangchejian discard tablespace;
alter table xs_zhuangches discard tablespace;
alter table zx_borrow discard tablespace;
alter table zx_borrows discard tablespace;
alter table zx_equipment discard tablespace;
alter table zx_repair discard tablespace;
alter table zx_repairs discard tablespace;
alter table zx_sblb discard tablespace;
alter table zx_warehouse discard tablespace;

再停止mysql,复制相应的idb文件到mysql data目录 ,再启动mysql
alter table cg_daohuo import tablespace;
alter table cg_daohuos import tablespace;
alter table cg_dingdan import tablespace;
alter table cg_dingdans import tablespace;
alter table cg_jihua import tablespace;
alter table cg_jihuas import tablespace;
alter table cl_baoxian import tablespace;
alter table cl_baoyang import tablespace;
alter table cl_cheliang import tablespace;
alter table cl_gps import tablespace;
alter table cl_jiayou import tablespace;
alter table cl_nianjian import tablespace;
alter table cl_weixiu import tablespace;
alter table cl_weizhang import tablespace;
alter table cms_news import tablespace;
alter table cpp_banchengpin import tablespace;
alter table cpp_chengpin import tablespace;
alter table cpp_dafenqiezongjie import tablespace;
alter table cpp_fenqiezhiling import tablespace;
alter table cpp_fenqiezhilings import tablespace;
alter table cpp_fhprint_temp import tablespace;
alter table cpp_liuyanzhiling import tablespace;
alter table cpp_liuyanzongjie import tablespace;
alter table cpp_xiaofenqiezhiling import tablespace;
alter table cpp_xiaofenqiezhilings import tablespace;
alter table cpp_xiaofenqiezongjie import tablespace;
alter table cw_accdetail import tablespace;
alter table cw_accvouch import tablespace;
alter table cw_accvouchs import tablespace;
alter table cw_beiyongjin import tablespace;
alter table cw_fapiaocg import tablespace;
alter table cw_fapiaocghx import tablespace;
alter table cw_fapiaodikou import tablespace;
alter table cw_fapiaoxs import tablespace;
alter table cw_fukuan import tablespace;
alter table cw_fukuans import tablespace;
alter table cw_fukuanshenqing import tablespace;
alter table cw_kehujizhang import tablespace;
alter table cw_qiantiao import tablespace;
alter table cw_shoukuan import tablespace;
alter table cw_shoukuans import tablespace;
alter table fgc_us_iz8vbd58xvta2gz import tablespace;
alter table fgc_us_izg52u5cmjgmikz import tablespace;
alter table fgc_us_jgsl import tablespace;
alter table fgc_us_s_iz8vbd58xvta2gz import tablespace;
alter table file_info import tablespace;
alter table flow import tablespace;
alter table flow_doc import tablespace;
alter table flow_todo import tablespace;
alter table flowmember import tablespace;
alter table flowstep import tablespace;
alter table kc_currstock import tablespace;
alter table kc_log import tablespace;
alter table kc_pandian import tablespace;
alter table kc_pandians import tablespace;
alter table kc_stockin import tablespace;
alter table kc_stockins import tablespace;
alter table kc_stockout import tablespace;
alter table kc_stockouts import tablespace;
alter table kc_stocktran import tablespace;
alter table kc_stocktrans import tablespace;
alter table kc_tongzhi import tablespace;
alter table kc_tongzhis import tablespace;
alter table ks_jiage import tablespace;
alter table ks_sushe import tablespace;
alter table ks_sushes import tablespace;
alter table pm_wenti import tablespace;
alter table qrtz_blob_triggers import tablespace;
alter table qrtz_calendars import tablespace;
alter table qrtz_cron_triggers import tablespace;
alter table qrtz_fired_triggers import tablespace;
alter table qrtz_job_details import tablespace;
alter table qrtz_locks import tablespace;
alter table qrtz_paused_trigger_grps import tablespace;
alter table qrtz_scheduler_state import tablespace;
alter table qrtz_simple_triggers import tablespace;
alter table qrtz_simprop_triggers import tablespace;
alter table qrtz_triggers import tablespace;
alter table sc_banliao import tablespace;
alter table sc_banliaos import tablespace;
alter table sc_banzu import tablespace;
alter table sc_banzus import tablespace;
alter table sc_gongzi import tablespace;
alter table sc_gongzibz import tablespace;
alter table sc_gongzis import tablespace;
alter table sc_guanxinkou import tablespace;
alter table sc_jiangcheng import tablespace;
alter table sc_jihua import tablespace;
alter table sc_jihuas import tablespace;
alter table sc_jiliang import tablespace;
alter table sc_jizu import tablespace;
alter table sc_jizus import tablespace;
alter table sc_liaocang import tablespace;
alter table sc_peifang import tablespace;
alter table sc_peifangs import tablespace;
alter table sc_renwu import tablespace;
alter table sc_renwubz import tablespace;
alter table sc_renwujz import tablespace;
alter table sc_renwuliao import tablespace;
alter table sc_renwus import tablespace;
alter table sc_yibiao import tablespace;
alter table sm_jiage import tablespace;
alter table smkc import tablespace;
alter table sys_logs import tablespace;
alter table sys_params import tablespace;
alter table sys_permission import tablespace;
alter table sys_role import tablespace;
alter table sys_role_permission import tablespace;
alter table sys_role_user import tablespace;
alter table sys_user import tablespace;
alter table t_acccode import tablespace;
alter table t_billcode import tablespace;
alter table t_customer import tablespace;
alter table t_customerclass import tablespace;
alter table t_dept import tablespace;
alter table t_dict import tablespace;
alter table t_inv import tablespace;
alter table t_invclass import tablespace;
alter table t_job import tablespace;
alter table t_mail import tablespace;
alter table t_mail_to import tablespace;
alter table t_notice import tablespace;
alter table t_notice_read import tablespace;
alter table t_person import tablespace;
alter table t_position import tablespace;
alter table t_pushmsg import tablespace;
alter table t_token import tablespace;
alter table t_txl import tablespace;
alter table t_vendor import tablespace;
alter table t_vendorclass import tablespace;
alter table test import tablespace;
alter table u8_accass import tablespace;
alter table u8_accsum import tablespace;
alter table u8_accvouch import tablespace;
alter table u8_accvouch2 import tablespace;
alter table xs_dingdan import tablespace;
alter table xs_dingdans import tablespace;
alter table xs_fahuo import tablespace;
alter table xs_fahuos import tablespace;
alter table xs_hetong import tablespace;
alter table xs_hetongs import tablespace;
alter table xs_paiche import tablespace;
alter table xs_paiches import tablespace;
alter table xs_tuihuojian import tablespace;
alter table xs_zhuangche import tablespace;
alter table xs_zhuangchejian import tablespace;
alter table xs_zhuangches import tablespace;
alter table zx_borrow import tablespace;
alter table zx_borrows import tablespace;
alter table zx_equipment import tablespace;
alter table zx_repair import tablespace;
alter table zx_repairs import tablespace;
alter table zx_sblb import tablespace;
alter table zx_warehouse import tablespace;

声明:何志林的个人网站|版权所有,违者必究|如未注明,均为原创|本网站采用BY-NC-SA协议进行授权

转载:转载请注明原文链接 - MySQL根据ibd恢复数据


人生最美是清欢