The bumpy road for junior DBAs never replicated data

  1. As a DBA operation and maintenance engineer who is struggling halfway, he made another low-level mistake.
  2. Problem Master-slave replication builds successfully. In the ssh operation install statement, there is never any data.
  3. I've been looking for a long time and haven't found any problems.
  4. After the great God pointed out. It was found that autocommit = off on the main, and the transaction was not committed. So there is never data. commit; just click or modify autocommit = on.
  5. Now explain the autocommit parameter. Submitted automatically.
  6.         Update statement and ddl statement, the default is to start a transaction,
  7.                        If autocommit is off, the transaction will not be committed. Manual submission required
  8.                        autocommit is on, a single statement will commit the transaction
  9. In the should layer, java application. Most architectures will be opened and submitted by the framework by default, and rolled back. For this reason, autocommit is not set to on in the configuration file, resulting in a misoperation.
  10. With autocommit set to off, the application must commit the transaction, reducing the misoperation of the application layer. But it will give ssh operation and maintenance personnel and managers a certain amount of trouble. Each has its own pros and cons.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326501230&siteId=291194637