Help Center/ Data Replication Service/ FAQs/ Real-Time Migration/ How Do I Ensure that All Services on the Database Are Stopped?
Updated on 2024-09-25 GMT+08:00

How Do I Ensure that All Services on the Database Are Stopped?

To ensure that all services on the database are stopped, perform the following steps:

  1. Run the following statement on the source database to check whether active connections exist:

    show processlist;
    Figure 1 Checking active connections

  2. Optional: If there are active connections, locate the service processes based on the values in the Host column in the command output and stop the service processes.
  3. Run the following statement in the source database to check the binlog position. Then, record the two values in the file and position columns as ckpt1:

    show master status;
    Figure 2 Viewing the binlog position

  4. Wait for more than 30s. Run the following statement in the source database to check the binlog position again. Then, record the two values in the file and position columns as ckpt2. If ckpt1 and ckpt2 are equal, no data is written to the source database.

    show master status;