当前位置:网站首页>Mysql database binlog log enable record
Mysql database binlog log enable record
2022-07-03 06:09:00 【vincentwc】
binlog Open Settings
win10
view the database binlog Whether to open
show variables like 'log_bin';
show variables like 'log_bin%';
open binlog journal
2.1 find mysql Configuration file for mysql.ini【 stay mysql Installation directory 】
2.2 stay mysqld The configuration is as follows
# Turn on binlog journal server_id=1 log-bin=mysql-bin binlog-format=ROWbinlog-format: There are three forms of master-slave synchronization
statement Will operate on the database sql The statement is written to binlog in
row Every data change will be written to binlog in .
mixed statement And row Mixing .Mysql Decide when to write statement Format , When to write row Format binlog
2.3 Restart the service , Check again
net stop mysql net start mysqlshow variables like 'log_bin%';
linux
see binlog state
Locate the configuration file and modify it
The location of the configuration file
/etc/my.cnfAdd the configuration
# Turn on binary log server-id=1 log-bin=/usr/local/mysql/data/mysql-bin
docker
The configuration is mapped to a local file , The local file configuration is as follows
[mysqld] #binlog setting log-bin=/var/lib/mysql/mysql-bin server-id=123454 binlog-format=ROW
restart mysql, Search found binlog It's not turned on
docker restart mysqlIt took a long time to find this hole on the Internet , Record the process
First , see docker About my.cnf I found this sentence in my log :
mysqld: [Warning] World-writable config file '/etc/mysql/``my.cnf``' is ignored.Viewing on the Internet is caused by the permission of the configuration file https://blog.csdn.net/qilovehua/article/details/45508925, For details, please refer to this blog post
Then enter docker Of mysql Container to check , Sure enough my.cnf The permissions for are 777
Change it to 644
chmod 644 my.cnfRestart again mysql Containers , Check it out binlog Successfully opened
however , If you make any changes to the mapped configuration file later , He will be mapped again to /etc/mysql/my.cnf This file and the permissions are reset to 777, Need to modify again
边栏推荐
- 项目总结--01(接口的增删改查;多线程的使用)
- 1. Sum of two numbers
- Convolution operation in convolution neural network CNN
- Leetcode problem solving summary, constantly updating!
- Clickhouse learning notes (2): execution plan, table creation optimization, syntax optimization rules, query optimization, data consistency
- pytorch DataLoader实现miniBatch(未完成)
- Why is the website slow to open?
- [teacher Zhao Yuqiang] use the catalog database of Oracle
- [teacher Zhao Yuqiang] calculate aggregation using MapReduce in mongodb
- 1. 兩數之和
猜你喜欢

卷积神经网络CNN中的卷积操作详解

Interesting research on mouse pointer interaction

Kubernetes notes (10) kubernetes Monitoring & debugging

Kubernetes notes (IV) kubernetes network

Disruptor learning notes: basic use, core concepts and principles

从小数据量分库分表 MySQL 合并迁移数据到 TiDB

tabbar的设置

Understand expectations (mean / estimate) and variances
![[teacher Zhao Yuqiang] Cassandra foundation of NoSQL database](/img/cc/5509b62756dddc6e5d4facbc6a7c5f.jpg)
[teacher Zhao Yuqiang] Cassandra foundation of NoSQL database

Redhat7 system root user password cracking
随机推荐
Complete set of C language file operation functions (super detailed)
Clickhouse learning notes (I): Clickhouse installation, data type, table engine, SQL operation
项目总结--2(Jsoup的基本使用)
[teacher Zhao Yuqiang] Cassandra foundation of NoSQL database
The server data is all gone! Thinking caused by a RAID5 crash
If function of MySQL
[teacher Zhao Yuqiang] kubernetes' probe
Code generator - single table query crud - generator
Creating postgre enterprise database by ArcGIS
Zhiniu stock -- 03
Analysis of Clickhouse mergetree principle
Project summary --01 (addition, deletion, modification and query of interfaces; use of multithreading)
tabbar的设置
Simple understanding of ThreadLocal
[Zhao Yuqiang] deploy kubernetes cluster with binary package
Es remote cluster configuration and cross cluster search
ThreadLocal的简单理解
[video of Teacher Zhao Yuqiang's speech on wot] redis high performance cache and persistence
phpstudy设置项目可以由局域网的其他电脑可以访问
Merge and migrate data from small data volume, sub database and sub table Mysql to tidb