Home  >  Article  >  Database  >  如何测试Amoeba已经实现负载均衡

如何测试Amoeba已经实现负载均衡

WBOY
WBOYOriginal
2016-06-07 17:34:42827browse

众所周知在mmm环境里面每个数据库的数据是一致的 那么你做完amoeba后所看到的内容是一致的就是已经负载均衡了你也看不出来,那么

Linux公社

首页 → 数据库技术

背景:

阅读新闻

如何测试Amoeba已经实现负载均衡

[日期:2014-01-14] 来源:Linux社区  作者:zuoyuezong [字体:]

众所周知在mmm环境里面每个数据库的数据是一致的 那么你做完amoeba后所看到的内容是一致的就是已经负载均衡了你也看不出来

那么怎么办呢?这里可以利用在/etc/my.cnf里面的一个参数实现,replicate_ignore_db = test

加入这个参数后重启数据库后可以实现test库在本库上不同步其他数据库test库,那么你可以一台一台的做假设你有4台数据库分别是

master1 master2 slave1 slave2且是已经做好了mmm的环境

那么你可以

1.登入master2 vim /etc/my.cnf 加入 replicate_ignore_db = test 重启数据库

2.登入master1的mysql使用test库创建一个t表 >use test; create table t(this varchar(10)); insert into t values('m1'); quit;

vim /etc/my.cnf 加入 replicate_ignore_db = test 重启数据库

3.登入master2 ;mysql >use test;

>create table t(this varchar(10)); insert into t values('m2'); quit;

4.登入slave1;vim /etc/my.cnf 加入 replicate_ignore_db = test 重启数据库

5. 登入master2 ;mysql >use test;insert into t values('m1m2iss2'); quit;

这样t表的数据就都不一样了

linux

  • 0
  • MySQL安装脚本只需执行即可安装

    CentOS 6.3下安装MySQL 5.5.35

    相关资讯       Amoeba 

  • 用Amoeba实现MySQL的读写分离  (12/20/2013 17:11:37)
  • Amoeba实现MySQL主从读写分离  (06/06/2011 08:30:28)
  • 图片资讯      

  • 用Amoeba实现MySQL的读写分离

    用Amoeba实现MySQL的
  • 本文评论   查看全部评论 (0)

    评论声明

    最新资讯

    本周热门

    Linux公社简介 - 广告服务 - 网站地图 - 帮助信息 - 联系我们
    本站(LinuxIDC)所刊载文章不代表同意其说法或描述,,仅为提供更多信息,也不构成任何建议。


    Copyright © 2006-2011 Linux公社 All rights reserved 浙ICP备06018118号

    Statement:
    The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn