Rate This Document
Findability
Accuracy
Completeness
Readability

Verifying Automatic Data Replication on Secondary Databases

  1. Log in to a secondary database.
    1
    /usr/local/mysql/bin/mysql -uroot -p123456 -S /data/mysql/run/mysql.sock
    
  2. Check whether data of the primary database is replicated automatically to the secondary database.
    1. Query user information of the secondary database.
      select user,host from mysql.user;

      If the user information is the same as that of the primary database, data is replicated successfully.

    2. Query the tables in the secondary database.
      show databases;
      use test;
      show tables;
      select * from student;

      If the tables are the same as those in the primary database, data is replicated successfully.