fix maxwell.md
This commit is contained in:
parent
609c067d5b
commit
d72a2221e5
48
maxwell.md
Normal file
48
maxwell.md
Normal file
@ -0,0 +1,48 @@
|
|||||||
|
## maxwell配置
|
||||||
|
|
||||||
|
## docker-compose.yml配置
|
||||||
|
```yaml
|
||||||
|
|
||||||
|
services:
|
||||||
|
maxwell:
|
||||||
|
image: docker.1ms.run/zendesk/maxwell:latest
|
||||||
|
container_name: maxwell
|
||||||
|
network_mode: "host"
|
||||||
|
|
||||||
|
restart: always
|
||||||
|
entrypoint: ["bin/maxwell"]
|
||||||
|
|
||||||
|
command:
|
||||||
|
- --host=127.0.0.1
|
||||||
|
- --port=3306
|
||||||
|
- --user=punchnetuser
|
||||||
|
- --password=punchnet@J1c8WGu
|
||||||
|
- --producer=redis
|
||||||
|
- --redis_host=127.0.0.1
|
||||||
|
- --redis_port=16379
|
||||||
|
- --redis_type=stream
|
||||||
|
- --redis_stream=maxwell_stream
|
||||||
|
- --log_level=info
|
||||||
|
```
|
||||||
|
|
||||||
|
## mysql权限配置
|
||||||
|
|
||||||
|
```sql
|
||||||
|
|
||||||
|
# 创建maxwell依赖的数据库
|
||||||
|
|
||||||
|
CREATE DATABASE maxwell;
|
||||||
|
GRANT ALL ON maxwell.* TO 'punchnetuser'@'%';
|
||||||
|
|
||||||
|
-- 1️⃣ 允许读取数据
|
||||||
|
GRANT SELECT ON *.* TO 'punchnetuser'@'%';
|
||||||
|
|
||||||
|
-- 2️⃣ 允许复制权限(关键)
|
||||||
|
GRANT REPLICATION SLAVE, REPLICATION CLIENT ON *.* TO 'punchnetuser'@'%';
|
||||||
|
|
||||||
|
-- 3️⃣ 如果还需要创建 maxwell 库
|
||||||
|
GRANT ALL ON maxwell.* TO 'punchnetuser'@'%';
|
||||||
|
|
||||||
|
FLUSH PRIVILEGES;
|
||||||
|
|
||||||
|
```
|
||||||
Loading…
x
Reference in New Issue
Block a user