当前位置:网站首页>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
边栏推荐
- MySQL 66 questions, 20000 words + 50 pictures in detail! Necessary for review
- Introduction to topological sorting
- Error:Kotlin: Module was compiled with an incompatible version of Kotlin. The binary version of its
- LeetCode重建二叉树详解[通俗易懂]
- Fiori applications are shared through the enhancement of adaptation project
- “国防七子”经费暴增,清华足足362亿元,甩第二名101亿 |全国高校2022预算大公开...
- 微机原理与接口技术知识点整理复习–纯手打
- B站被骂上了热搜。。
- 10. Page layout, guess you like it
- Detailed explanation of leetcode reconstruction binary tree [easy to understand]
猜你喜欢

Station B was scolded on the hot search..

奔涌而来的数字化浪潮,将怎样颠覆未来?

Understand the window query function of tdengine in one article

队列的基本操作(C语言实现)

Enter the top six! Boyun's sales ranking in China's cloud management software market continues to rise

陈宇(Aqua)-安全->云安全->多云安全
![[安网杯 2021] REV WP](/img/98/ea5c241e2b8f3ae4c76e1c75c9e0d1.png)
[安网杯 2021] REV WP

Kongsong (Xintong Institute) - cloud security capacity building and trend in the digital era

Summary of interview questions (1) HTTPS man in the middle attack, the principle of concurrenthashmap, serialVersionUID constant, redis single thread,
![[machine learning] VAE variational self encoder learning notes](/img/38/3eb8d9078b2dcbe780430abb15edcb.png)
[machine learning] VAE variational self encoder learning notes
随机推荐
Simplex, half duplex, full duplex, TDD and FDD
【IoT毕设.上】STM32+机智云AIoT+实验室安全监控系统
3.4 data query in introduction to database system - select (single table query, connection query, nested query, set query, multi table query)
C语言订餐管理系统
玩转MongoDB—搭建MongoDB集群
Summary of 20 practical typescript single line codes
【剑指 Offer】55 - II. 平衡二叉树
Listen in the network
Fiori 应用通过 Adaptation Project 的增强方式分享
Computer network interview knowledge points
1. Sum of two numbers: given an integer array num and an integer target value, please find the two integers whose sum is the target value target in the array and return their array subscripts
App automation testing Kaiyuan platform appium runner
uni-app实现广告滚动条
What class loading mechanisms does the JVM have?
Camp division of common PLC programming software
2.15 summary
arthas使用
[anwangbei 2021] Rev WP
Chen Yu (Aqua) - Safety - & gt; Cloud Security - & gt; Multicloud security
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)