Updated on 2023-01-05 GMT+08:00

Checking Whether the Source Database Binlog Is Enabled

MySQL Migration

Table 1 Checking whether the source database binlog is enabled

Check Item

Whether the source database binlog is enabled

Description

Check whether binlog is enabled for the source database.

Failure Cause and Handling Suggestion

Failure cause: This item cannot be checked because the source database fails to be connected.

Handling suggestion: Check whether the source database is connected.

Failure cause: Insufficient user permissions

Handling suggestion: Check whether the database user permissions meet the migration requirements.

NOTE:

For details about the required MySQL permissions and authorized operations, see Which MySQL Permissions Are Required for DRS?

Failure cause: The binlog function is disabled on the source database.

Handling suggestion:

  • If the source is an on-premises database, perform the following operations to enable binlog.
    1. Run the following command to check whether binlog is enabled:
      show variables like "log_bin";

    2. If binlog is disabled, add log-bin = mysql-bin followed by [mysqld] in the MySQL configuration file my.cnf or my.ini.

    3. Restart the database.

  • If the source is an RDS instance, enable binlog by referring to the RDS official documentation.