FAQs About Binlogs
This section describes FAQs about TaurusDB binlogs.
How Can I Check Binlogs of My TaurusDB Instance?
- Connect to your DB instance. For details, see Connecting to a DB Instance.
- Run the following command to read binlogs:
SHOW BINLOG EVENTS [IN 'log_name'] [FROM pos] [LIMIT [offset,] row_count];
If the system displays a message indicating that you do not have the required permission, run the GRANT command to grant the REPLICATION SLAVE permission to the database user.
GRANT SELECT, REPLICATION SLAVE ON *.* TO 'xx'@'%'; FLUSH PRIVILEGES;
Does Pulling Binlogs Affect Instance Performance?
A single pull task has little impact on performance. However, if dozens or hundreds of tasks are executed simultaneously, the resource consumption will increase significantly. You are advised to perform this operation during off-peak hours.
What Can I Do If Binlogs Fail to Be Pulled?
- Check whether local binlog recording is enabled. For details, see Enabling Local Binlogs.
- If disabled, binlogs cannot be pulled.
- If enabled, identify the binlog pulling method used. If you are unsure of the method, submit a service ticket to contact customer service.
- Pulling directly from the TaurusDB instance: Check whether the connected node is the primary node or a read replica.
- If it is a read replica, the kernel version of the TaurusDB instance must be 2.0.54.240600 or later and Binlog Pull for Read Replicas must be enabled. Otherwise, binlogs cannot be pulled and an error message is reported (keyword: Unknown command, error code: 1047).
- If it is the primary node, submit a service ticket to contact Huawei Cloud customer service.
- Pulling through a proxy instance: The proxy kernel version must be 2.24.12.000 or later, and Binlog Pull for a Proxy Instance must be enabled. This feature is disabled by default. If it is disabled, the pulling will fail with an error reported (keyword: Unknown command, error code: 1047). To enable the feature, refer to Enabling Binlog Pull for a Proxy Instance.
If your proxy kernel version meets the preceding requirements and Binlog Pull for a Proxy Instance is enabled but the issue persists, submit a service ticket to contact Huawei Cloud customer service.
Why Does the position Value Shown by show master status Remain Unchanged When Write Operations Are Being Performed?
position indicates the position of the bytes written to the binlogs of the primary database. The show master status command only returns the position value when the kernel version is 2.0.45.230900 or later.
You are advised to check the binlog switch status. The binlog switch is controlled by the rds_global_sql_log_bin parameter and is disabled by default. If the binlog switch is disabled, the position value will not change. If the binlog switch is enabled but the position value remains unchanged, submit a service ticket.
For details about how to change the parameter value, see Modifying Parameters of a DB Instance.
Why Does the Size of Some Binlogs Exceed the Value of max_binlog_size?
max_binlog_size specifies the maximum size of a single binlog. When a binlog reaches this size, the database closes the binlog, generates a new one, and writes new data to the new binlog.
If a large transaction (such as a large-scale INSERT, UPDATE, or DELETE operation) is encountered, the entire transaction must be written to the same binlog, which can cause the binlog size to exceed the max_binlog_size limit.
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.
Chatbot