Verifying Automatic Data Replication on Secondary Databases
- Log in to a secondary database.
1/usr/local/mysql/bin/mysql -uroot -p123456 -S /data/mysql/run/mysql.sock
- Check whether data of the primary database is replicated automatically to the secondary database.
- 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.
- 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.
- Query user information of the secondary database.
Parent topic: Verifying Primary-Secondary Replication