In your MySQL primary database, create a database user that must have appropriate permissions on all databases for which the Peaka CDC captures changes.
Create the MySQL user:
Copy
Ask AI
CREATE USER <username>@'%' IDENTIFIED WITH mysql_native_password BY 'password';
Grant the required permissions to the user:
Copy
Ask AI
GRANT SELECT, RELOAD, SHOW DATABASES, REPLICATION SLAVE, REPLICATION CLIENT ON *.* TO <username>@'%';
// for MySql 5.xmysql> SELECT variable_value as "BINARY LOGGING STATUS (log-bin) ::"FROM information_schema.global_variables WHERE variable_name='log_bin';// for MySql 8.xmysql> SELECT variable_value as "BINARY LOGGING STATUS (log-bin) ::"FROM performance_schema.global_variables WHERE variable_name='log_bin';
If it is OFF, configure your MySQL server configuration file with the following properties, which are described in the table below:
Copy
Ask AI
server-id = 223344 # Querying variable is called server_id,e.g. SELECT variable_value FROM information_schema.global_variablesWHERE variable_name='server_id';log_bin = mysql-binbinlog_format = ROWbinlog_row_image = FULLexpire_logs_days = 10