荣耀彩票代理

IT技术互动交流平台

MySQL通过binlog的方法恢复数据

作者:wy  来源:网络整理  发布日期:2019-01-22 08:32:00

  今天小编我就带领大家一起来学习到新的章节这次的章节是MySQL而我们今天所要说的内容是如何通过MySQL通过binlog的方法恢复数据,这个方法并不难但是能因为本篇文章全是文字没有图片在下面的解析,所以小编我很担心你们操作不当。

  通过了解 binlog 日志的相关配置,简单掌握通过 binlog 对数据库进行数据恢复操作;

荣耀彩票代理  mysql RIZHIWENJIAN

  RENHECHENGSHURUANJIANDOUHUIYOUYITAOCHENGSHUDERIZHIXITONG,DANGRUANJIANCHUXIANWENTISHI,ZHEIXIERIZHIJIUSHICHAXUNWENTILAIYUANDEBAOKU。TONGYANG,mysql YEBULIWAI,YEHUIYOUYIXILIERIZHIJILU mysql DEYUNXINGZHUANGTAI。

  mysql ZHUYAOYOUYIXIAJIZHONGRIZHI:

荣耀彩票代理  CUOWURIZHI:JILU mysql YUNXINGGUOCHENGZHONGDECUOWUXINXI

  YIBANCHAXUNRIZHI:JILUmysqlZHENGZAIYUNXINGDEYUJU,BAOKUOCHAXUN、XIUGAI、GENGXINDENGDEMEITIAO sql

  MANCHAXUNRIZHI:JILUCHAXUNBIJIAOHAOSHIDE SQL YUJU

  binlog RIZHI:JILUSHUJUXIUGAIJILU,BAOKUOCHUANGJIANBIAO、SHUJUGENGXINDENG

  ZHEIXIERIZHIJUNXUYAOZAI my.cnf WENJIANJINXINGPEIZHI,RUGUOBUZHIDAO mysql DEPEIZHIWENJIANLUJING,KEYISHIYONG mysql MINGLINGJINXINGCHAZHAO,

  mysql --verbose --help|grep -A 1 'Default options’ #GAIMINGLINGHUILUOLIECHUmy.cnf SHUNXUCHAZHAODELUJING。

荣耀彩票代理  binlog RIZHI

  binlog JIUSHI binary log,ERJINZHIRIZHIWENJIAN,JILUSUOYOUSHUJUKUGENGXINYUJU,BAOKUOBIAOGENGXINHEJILUGENGXIN,JISHUJUCAOZONGYUYAN(DML),binlog ZHUYAOYONGYUSHUJUHUIFUHEPEIZHIZHUCONGFUZHIDENG;

  SHUJUHUIFU:DANGSHUJUKUWUSHANHUOZHEFASHENGBUKEMIAOSHUDESHIQINGSHI,KEYITONGGUO binlog HUIFUDAOMOUGESHIJIANDIANDESHUJU。

  ZHUCONGFUZHI:DANGYOUSHUJUKUGENGXINZHIHOU,ZHUKUTONGGUO binlog JILUBINGTONGZHICONGKUJINXINGGENGXIN,CONGERBAOZHENGZHUCONGSHUJUKUSHUJUYIZHI;

  mysql ANZHAOGONGNENGFENWEIFUWUCENGMOKUAIHECUNCHUYINQINGCENGMOKUAI,FUWUCENGFUZEKEHUDUANLIANJIE、SQL YUJUCHULIYOUHUADENGCAOZUO,CUNCHUYINQINGCENGFUZESHUJUDECUNCHUHECHAXUN;binlog SHUYUFUWUCENGMOKUAIDERIZHI,JIYINQINGWUGUANXING,SUOYOUSHUJUYINQINGDESHUJUGENGGAIDOUHUIJILUbinlogRIZHI。DANGSHUJUKUFASHENGBENGKUISHI,RUGUOSHIYONGInnoDB YINQING,binlog RIZHIHAIKEYIJIANYAN InnoDB DE redo RIZHIDE commit QINGKUANG。

mysql

荣耀彩票代理  binlog RIZHIKAIQI

  RIZHIKAIQIFANGSHI:

  1、TIANJIAPEIZHI

荣耀彩票代理  log_bin=ON

  log_bin_basename=/path/bin-log

  log_bin_index=/path/bin-log.index

  2、JINJINSHEZHIlog-binCANSHU

  log-bin=/path/bin-log

荣耀彩票代理  DANGKAIQI binlog RIZHIZHIHOU,mysql HUICHUANGJIANYIGE log_bin_index ZHIDINGDE .index WENJIANHEDUOGEERJINZHIRIZHIWENJIAN,index ZHONGANSHUNXUJILULEmysqlSHIYONGDESUOYOU binlog WENJIAN。binlog RIZHIZEHUIYIZHIDINGDEMINGCHENG(HUOMORENZHI) JIAZIZENGDESHUZIZUOWEIHOUZHUI,ex:bin-log.000001,DANGFASHENGXIASHUSANZHONGQINGKUANGSHI,binlog RIZHIBIANHUIJINXINGZHONGJIAN:

  WENJIANDAXIAODADAO max_binlog_size CANSHUDEZHI

  ZHIXING flush logs MINGLING

  ZHONGQI mysql FUWU

  binlog RIZHIGESHI

荣耀彩票代理  TONGGUOCANSHU binlog_format CANSHUDEZHI,KEYISHEZHI binlog DEGESHI,KEXUANZHIYOU statement、row、mixed

荣耀彩票代理  * statement GESHI:JILUSHUJUKUZHIXINGDEYUANSHI SQL YUJU

  * row GESHI:JILUJUTIDEXINGDEXIUGAI,ZHEIGEWEIMUQIANMORENZHI

  * mixed GESHI:YINWEISHANGBIANLIANGZHONGGESHIGEYOUYOUQUEDIAN,SUOYIJIUCHUXIANLE mixed GESHI.

  BUZHIDAONIMENKANWANZHEIPIANWENZHANGYIHOUZUOHEGANXIANGNI?SHIJUEDELIYONGMySQLTONGGUObinlogDEFANGFAHUIFUSHUJUHENJIANDANNIHAISHIJUEDEHENFUZA,DANSHIMEIYOUGUANXIRUGUONIJUEDESHIZAISHIHENNANKANDONGDEHUA,NIKEYIZAIWOWANGZHANSOUSUOQITAXIANGGUANZIXUN。

延伸阅读:

Tag标签:         
  • 专题推荐

About IT165 - 广告服务 - 隐私声明 - 版权申明 - 免责条款 - 网站地图 - 网友投稿 - 联系方式
本站内容来自于互联网,仅供用于网络技术学习,学习中请遵循相关法律法规