赞
踩
- [mysqld]
- log_timestamps=SYSTEM
- default-time-zone='+8:00'
-
- server-id=1
-
- log-bin=mysql-bin
-
- binlog-do-db = mall # 要监听的库
-
- binlog_format=ROW
- docker run --name mysql01 \
- -p 3306:3306 \
- -v /opt/mysql/conf.d:/etc/mysql/conf.d \
- -v /opt/mysql/data:/var/lib/mysql \
- -e MYSQL_ROOT_PASSWORD=123456 \
- -d mysql:8.0
- show variables like 'log_%';
-
- show variables like 'binlog_format';
-
- show variables like 'server_id';
-
- --查看所有日志
- show binlog events;
-
- --查看最新的日志
- show master status
-
- -- 查询指定的binlog日志
- show binlog events in 'XTZJ-20221008CY-bin.000020'
-
- --清空所有的 binlog 日志文件
- reset master
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。