Home > Database > Mysql Tutorial > body text

What is the role of binlog in mysql

WBOY
Release: 2023-06-02 23:31:02
forward
1732 people have browsed it

1、数据恢复。只要有数据库在某个时刻的备份以及此时后的所有binlog,就可以恢复数据库的数据。

在我们的日常工作中,我们的DBA学生经常可以帮助我们将数据库的数据恢复到任何一秒。

2、主从复制。为了提高MySQL的效率,经常做读写分离,即一主多从。

一个主库(写库),多个从库(读库)。

此时,从库可以监控主库的binlog日志,同步写库的所有更改操作。

实例

binlog_format = MIXED
log-bin = E:mysql路径\\mysql-5.6.35-winx64\\logs\\mysql-bin.log
expire-logs-days = 7
max_binlog_size = 200m
binlog_cache_size = 10m
max_binlog_cache_size = 500m
Copy after login

The above is the detailed content of What is the role of binlog in mysql. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:yisu.com
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!