How Do I Set Global binlog_format=ROW to Take Effect Immediately?
During migration or synchronization for MySQL databases, the source database binlog must be in the ROW format. Otherwise, the task fails. After binlog_format=ROW at the global level is set in the source database, all the previous service threads need to be stopped because these threads still connect the binlog in the non-ROW format.
Procedure
- Log in to the source database using the MySQL official client or other tools.
- Run the following command for setting global parameters in the source database.
set global binlog_format = ROW;
- Run the following command on the source database and check whether the preceding operation is successful:
select @@global.binlog_format;
- You can use either of the following methods to ensure that the modified binlog format of the source database takes effect immediately:
Method 1
- Select a non-service period to disconnect all service connections on the current database.
- Run the following command to query all service threads (excluding all binlog dump threads and current threads) in the current database:
show processlist;
- Stop all the service threads queried in the previous step.
Do not create or start a migration task before the preceding operations are complete. Otherwise, data may be inconsistent.
- Run the following command to query all service threads (excluding all binlog dump threads and current threads) in the current database:
- To prevent the binlog format of the source database from becoming invalid due to database restart, add or modify the binlog_format parameter in the startup configuration file (my.ini or my.cnf) of the source database and save the modification.
binlog_format=ROW
Method 2
- To prevent the binlog format of the source database from becoming invalid due to database restart, add or modify the binlog_format parameter in the startup configuration file (my.ini or my.cnf) of the source database and save the modification.
binlog_format=ROW
- Ensure that the binlog_format parameter is successfully added or modified. Then, restart the source database at a non-service period.
- Select a non-service period to disconnect all service connections on the current database.
General Operations FAQs
- What Can I Do When Information Overlaps on the DRS Console?
- Is the Destination Instance Set to Read-only or Read/Write?
- How Do I Set Global binlog_format=ROW to Take Effect Immediately?
- How Do I Set binlog_row_image=FULL to Take Effect Immediately?
- How Do I Change the Destination Database Password to Meet the Password Policy?
- How Do I Configure the Shard Key for a MongoDB Sharded Cluster?
- Does Bandwidth Expansion Affect the Running DRS Tasks?
- Why Data in MariaDB and SysDB Cannot Be Migrated or Synchronized?
- Constraints and Operation Suggestions on Many-to-One Scenario
- Constraints and Operation Suggestions on One-to-Many Scenario
- Where Can I View DRS Operation Logs?
- Why Is the Language of the Message Sent by DRS Inconsistent with That on the Page?
- Why Is a DRS Task Automatically Stopped?
- How Can I Export a DRS Task List?
- Can a Completed Task Be Restarted?
- What Are the Differences Between Resetting a Task and Recreating a Task?
- Does DRS Support Backward Migration/Synchronization?
- Why Cannot I Select an Existing SMN Topic?
- Can I Change an SMN Topic After a Task Is Created?
- How Do I Set the Number of Source Shards and Source Database Information When DDM Is the Source Database?
- Will Data of DRS Tasks Be Lost After a Primary/Standby Switchover Occurs on the Source MySQL Database?
- What Are the Differences Between All, Tables, and Databases During DRS Object Selection?
- What Do I Do After Changing the Password of the Source or Destination Database?
- How Do I Configure an SMN Topic Policy to Allow DRS to Publish Messages?
- What Can I Do If a DRS Task Times Out Due to Too Many Tables?
- Can I Change the Source or Destination Database After a DRS Task Is Created?
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbotmore