MySQL

Modify Configuration Files

MySQL configuration file /etc/mysql/my.cnf:

 1[mysqld]
 2# Prefix of the binlogs
 3log-bin=mysql-bin
 4
 5# Binlog Format: row-based logging, only Maxwell needs binlog_format=row
 6binlog_format=row
 7binlog_row_image=full
 8
 9# Enable GTID for consistency
10gtid_mode=ON
11enforce_gtid_consistency=ON
12
13# The databases captured. GART will capture all databases if not specified.
14binlog-do-db=ldbc  # change the name to your database
15binlog-do-db=...   # change the name to your database

Create MySQL User

Create a MySQL user for the log capture (Debezium):

 1# Create a user call "dbuser" with password "123456"
 2# The hostname part of the account name, if omitted, defaults to '%'.
 3CREATE USER 'dbuser'@'localhost' IDENTIFIED BY '123456';
 4
 5# Grant necesarry privileges
 6# PrivilegesRELOAD and SHOW DATABASES are only used for Debezium
 7GRANT SELECT, RELOAD, SHOW DATABASES, REPLICATION SLAVE, REPLICATION CLIENT ON *.* TO 'dbuser'@'localhost';
 8
 9# Grant privileges on the database "dbuser", only used for Maxwell
10GRANT ALL ON maxwell.* TO 'dbuser'@'localhost';