Package Data | |
---|---|
Maintainer Username: | telanflow |
Maintainer Contact: | telanflow@gmail.com (telanflow) |
Package Create Date: | 2019-09-27 |
Package Last Update: | 2020-05-27 |
Home Page: | |
Language: | PHP |
License: | MIT |
Last Refreshed: | 2024-11-21 03:01:36 |
Package Statistics | |
---|---|
Total Downloads: | 520 |
Monthly Downloads: | 0 |
Daily Downloads: | 0 |
Total Stars: | 22 |
Total Watchers: | 2 |
Total Forks: | 3 |
Total Open Issues: | 0 |
该扩展实现了 mysql replication protocol。
可用于实时监听mysql数据变更、数据同步等场景
| PHP | Laravel | Mysql | Swoole | |:-------:|:-------:|:-----:|:-------:| | >= 7.2 | >=5.5 | 5.5/5.6/5.7 | >=4.2 |
composer require telanflow/laravel-binlog
默认设置在 config/binlog.php 中。将此文件复制到您自己的配置目录以修改值。
你可以使用这个命令发布配置:
php artisan vendor:publish --provider="Telanflow\Binlog\LaravelServiceProvider"
开启mysql binlog支持,并且指定格式为row,如下配置
[mysqld]
server-id = 1
log_bin = /var/log/mysql/mysql-bin.log
expire_logs_days = 10
max_binlog_size = 100M
binlog-format = row #Very important if you want to receive write, update and delete row events
Please see Wiki
php artisan mysql:binlog [start|stop|restart|infos]
The Laravel-Binlog package is open-sourced software licensed under the MIT license.