注意查看:
Slave_IO_Running: Yes
Slave_SQL_Running: Yes
以上这两个参数的值为Yes,即说明配置成功!
4、测试
1、进入MySQL主服务器abao68
#进入主服务器MySQL控制台
mysql -u root -p
#进入数据库
mysql> use abaotest
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Database changed
#创建test表
mysql> CREATE TABLE test ( id int not null primary key,name char(20) );
Query OK, 0 rows affected (0.02 sec)
2、进入MySQL从服务abao67
#进入MySQL控制台
mysql -u root -p
#进入数据库
mysql> use abaotest
#查看abaotest表结构,会看到有一个新建的表test,表示数据库同步成功
mysql> use abaotest
Database changed
mysql> show tables;
+--------------------+
| Tables_in_abaotest |
+--------------------+
| books |
| category |
| test |
+--------------------+
3 rows in set (0.00 sec)
您若能看到如上内容,证明您成功啦!