当前位置:网站首页>MySQL log
MySQL log
2022-07-01 13:49:00 【Little program ape CCC】
redolog and binlog
- redolog yes innodb Self contained ,binlog yes mysql Self contained
- redolog It is similar to buffer , Write the transaction information to this buffer , With redolog The database can crash and restart without losing data ,innodb_flush_log_at_trx_commit Set to 1 You can persist transactions to disk every time ,innodb_log_buffer_size Is the cache size
- binlog Is to record the log of logic modification ,sync_binlog Set to 1 Can guarantee binlog Don't lose
- Timing by mysqldump Backup database , according to binlog Recover data in time
mysqldump
- mysqldump -u root -p --databases xx xxx xx > xx.sql Save multiple databases
- mysqldump -u root -p aaa bbb > xx.sql aaa Library bbb surface
- mysqldump -u root -p --no-data As long as the table structure
binlog
- show variables like ‘%bin%’ see binlog Open or not
- If it is not opened, it is my.cnf Of mysqld Add below log_bin=mysql-bin
- show binlog events in ‘mysql-bin.00000x’; see binlog
- mysqlbinlog binlog The full path -d Database name --skip-gtids --start-position= Serial number --stop-position= Serial number > xx.sql binlog Convert to corresponding sql
- –start-datetime,–start-position and –stop-position All optional parameters
- binlog It is divided into 3 Two recording modes ,statement,row and mixed
- statement: Record native sql, It is possible that the master-slave execution will be inconsistent , Not recommended
- row: Record information , Executive sql The amount of data is very large and takes up a lot of space
- mixed: Top two blends , If mysql If you think there will be no inconsistency, use statement Record , Too much data to use row Record
undolog
- Reverse operation of record operation , Used to rollback and maintain consistency
边栏推荐
- Global and Chinese silicone defoamer production and marketing demand and investment forecast analysis report Ⓨ 2022 ~ 2027
- Yan Rong looks at how to formulate a multi cloud strategy in the era of hybrid cloud
- Error:Kotlin: Module was compiled with an incompatible version of Kotlin. The binary version of its
- [Jianzhi offer] 55 - ii balanced binary tree
- About fossage 2.0 "meta force meta universe system development logic scheme (details)
- [flask] flask starts and implements a minimal application based on flask
- MySQL六十六问,两万字+五十图详解!复习必备
- The best landing practice of cave state in an Internet ⽹⾦ financial technology enterprise
- 8 popular recommended style layout
- Machine learning summary (I): linear regression, ridge regression, Lasso regression
猜你喜欢

QT社团管理系统

A new book by teacher Zhang Yujin of Tsinghua University: 2D vision system and image technology (five copies will be sent at the end of the article)

焱融看 | 混合云时代下,如何制定多云策略

Explain IO multiplexing, select, poll, epoll in detail

Introduction to distributed transactions (Seata)

介绍一种对 SAP GUI 里的收藏夹事务码管理工具增强的实现方案

清华章毓晋老师新书:2D视觉系统和图像技术(文末送5本)

面试题目总结(1) https中间人攻击,ConcurrentHashMap的原理 ,serialVersionUID常量,redis单线程,

【机器学习】VAE变分自编码器学习笔记

2022上半年英特尔有哪些“硬核创新”?看这张图就知道了!
随机推荐
使用net core 6 c# 的 NPOI 包,读取excel..xlsx单元格内的图片,并存储到指定服务器
2.15 summary
2022上半年英特尔有哪些“硬核创新”?看这张图就知道了!
【 剑指 Offer】55 - I. 二叉树的深度
[sword finger offer] 55 - I. depth of binary tree
Interpretation of R & D effectiveness measurement framework
新手准备多少钱可以玩期货?农产品可以吗?
leetcode 322. Coin change (medium)
spark源码阅读总纲
【IoT毕设.下】STM32+机智云AIoT+实验室安全监控系统
The best landing practice of cave state in an Internet ⽹⾦ financial technology enterprise
SAP intelligent robot process automation (IRPA) solution sharing
运行游戏时出现0xc000007b错误的解决方法[通俗易懂]
Analysis report on the development prospect and investment strategy of the global and Chinese laser chip industry Ⓑ 2022 ~ 2027
我们该如何保护自己的密码?
spark源码(五)DAGScheduler TaskScheduler如何配合提交任务,application、job、stage、taskset、task对应关系是什么?
[NLP] pre training model - gpt1
C语言订餐管理系统
leetcode622.设计循环队列(C语言)
04 redis source code data structure dictionary