When OceanBase Migration Service (OMS) is performing full data migration tasks, it reads the binlogs of the source MySQL database to synchronize incremental data to the destination database in real time. Before migrating incremental data from a MySQL database by using OMS, you must enable binlogs for the MySQL database.
The binlog configuration of the MySQL database is checked in the precheck step of a data migration task. If an error occurs during the precheck, enable binlogs for the MySQL database by performing the following operations.
Procedure
Log on to the host where the self-managed MySQL database resides.
Run the following command to modify the
my.cnffile of the MySQL database.The
my.cnffile is stored at/etc/my.cnfby default.log_bin=mysql_bin binlog_format=row binlog_row_image=full // This setting is required if the source database version is MySQL 5.6 or later.Run the following command to restart the MySQL database.
[$Mysql_Dir] must be replaced with the installation path of the MySQL database.
[$Mysql_Dir]/bin/mysqladmin -u root -p ****** [$Mysql_Dir]/bin/safe_mysqld &Log on to the self-managed MySQL database and execute the following SQL statement to confirm that the binlog feature is enabled.
show variables like '%log_bin%';In the returned information, both
log binandsql log binmust be ON to indicate that the binlog feature is enabled.