Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Sql_log_bin of MySQL Parameter Analysis

2025-03-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

There are many times when we want a SQL statement to be executed only on the Master database and not copied to the Slave database, at which point the sql_log_bin parameter is exactly what you need.

For example, if we want to import the data only into the main library, but the Slave database remains the same, we can do this:

Master mysql > set sql_log_bin=0

Master mysql > source xxoo.sql

There are a few points to pay attention to when using this parameter:

1. This order is valid only for session.

(2) the SQL statements of insert, UPDATE and DELETE will lead to data inconsistency between Master and Slave databases, so be careful.

When performing operations in the database, be sure to keep a clear head and be very clear about what you are doing.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report