当前位置:网站首页>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
边栏推荐
- Jedis source code analysis (II): jediscluster module source code analysis
- 从小数据量分库分表 MySQL 合并迁移数据到 TiDB
- 项目总结--01(接口的增删改查;多线程的使用)
- How does win7 solve the problem that telnet is not an internal or external command
- 【系统设计】邻近服务
- tabbar的设置
- [teacher Zhao Yuqiang] calculate aggregation using MapReduce in mongodb
- Tabbar settings
- Svn branch management
- Kubernetes notes (IX) kubernetes application encapsulation and expansion
猜你喜欢

项目总结--2(Jsoup的基本使用)

Jedis source code analysis (I): jedis introduction, jedis module source code analysis

Use abp Zero builds a third-party login module (I): Principles

Understand expectations (mean / estimate) and variances

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

Kubernetes notes (IV) kubernetes network

ThreadLocal的简单理解

GPS坐标转百度地图坐标的方法

Pytorch dataloader implements minibatch (incomplete)

Simple understanding of ThreadLocal
随机推荐
PHP用ENV获取文件参数的时候拿到的是字符串
arcgis创建postgre企业级数据库
MySQL带二进制的库表导出导入
为什么网站打开速度慢?
Migrate data from Amazon aurora to tidb
Understand the first prediction stage of yolov1
Understand expectations (mean / estimate) and variances
Loss function in pytorch multi classification
JS implements the problem of closing the current child window and refreshing the parent window
Exportation et importation de tables de bibliothèque avec binaires MySQL
智牛股项目--05
Kubernetes notes (III) controller
70 shell script interview questions and answers
ThreadLocal的简单理解
Solve the problem of automatic disconnection of SecureCRT timeout connection
BeanDefinitionRegistryPostProcessor
Kubernetes notes (VII) kuberetes scheduling
輕松上手Fluentd,結合 Rainbond 插件市場,日志收集更快捷
Convolution operation in convolution neural network CNN
Skywalking8.7 source code analysis (II): Custom agent, service loading, witness component version identification, transform workflow