rpl000015.test
上传用户:tsgydb
上传日期:2007-04-14
资源大小:10674k
文件大小:1k
源码类别:

MySQL数据库

开发平台:

Visual C++

  1. connect (master,localhost,root,,test,0,mysql-master.sock);
  2. connect (slave,localhost,root,,test,0, mysql-slave.sock);
  3. source include/have_default_master.inc;
  4. connection master;
  5. reset master;
  6. show master status;
  7. save_master_pos;
  8. connection slave;
  9. reset slave;
  10. show slave status;
  11. change master to master_host='127.0.0.1';
  12. show slave status;
  13. change master to master_host='127.0.0.1',master_user='root',
  14.  master_password='',master_port=9306;
  15. show slave status;
  16. slave start;
  17. sync_with_master;
  18. show slave status;
  19. connection master;
  20. drop table if exists foo;
  21. create table foo (n int);
  22. insert into foo values (10),(45),(90);
  23. save_master_pos;
  24. connection slave;
  25. sync_with_master;
  26. select * from foo;
  27. connection master;
  28. drop table foo;
  29. save_master_pos;
  30. connection slave;
  31. sync_with_master;