当前位置:网站首页>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
边栏推荐
- Clickhouse learning notes (2): execution plan, table creation optimization, syntax optimization rules, query optimization, data consistency
- Tabbar settings
- pytorch DataLoader实现miniBatch(未完成)
- Project summary --01 (addition, deletion, modification and query of interfaces; use of multithreading)
- Migrate data from Mysql to tidb from a small amount of data
- ThreadLocal的简单理解
- Kubesphere - set up redis cluster
- Solve the problem that Anaconda environment cannot be accessed in PowerShell
- Kubernetes notes (VI) kubernetes storage
- [teacher Zhao Yuqiang] kubernetes' probe
猜你喜欢

Phpstudy setting items can be accessed by other computers on the LAN

Advanced technology management - do you know the whole picture of growth?

pytorch DataLoader实现miniBatch(未完成)

Interesting research on mouse pointer interaction
![[video of Teacher Zhao Yuqiang's speech on wot] redis high performance cache and persistence](/img/a7/2140744ebad9f1dc0a609254cc618e.jpg)
[video of Teacher Zhao Yuqiang's speech on wot] redis high performance cache and persistence

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

Solve the 1251 client does not support authentication protocol error of Navicat for MySQL connection MySQL 8.0.11

.NET程序配置文件操作(ini,cfg,config)

JDBC connection database steps
![[teacher Zhao Yuqiang] use Oracle's tracking file](/img/0e/698478876d0dbfb37904d7b9ff9aca.jpg)
[teacher Zhao Yuqiang] use Oracle's tracking file
随机推荐
Use abp Zero builds a third-party login module (I): Principles
88. Merge two ordered arrays
Pytorch dataloader implements minibatch (incomplete)
Skywalking8.7 source code analysis (II): Custom agent, service loading, witness component version identification, transform workflow
When PHP uses env to obtain file parameters, it gets strings
[teacher Zhao Yuqiang] MySQL flashback
JDBC connection database steps
Skywalking8.7 source code analysis (I): agent startup process, agent configuration loading process, custom class loader agentclassloader, plug-in definition system, plug-in loading
[video of Teacher Zhao Yuqiang's speech on wot] redis high performance cache and persistence
CAD插件的安装和自动加载dll、arx
ThreadLocal的简单理解
Cesium 点击获三维坐标(经纬度高程)
项目总结--04
项目总结--01(接口的增删改查;多线程的使用)
Detailed explanation of findloadedclass
Migrate data from Amazon aurora to tidb
从小数据量分库分表 MySQL 合并迁移数据到 TiDB
1. Sum of two numbers
Simple handwritten ORM framework
PMP notes