As we all know, in the mmm environment, the data in each database is consistent, so what you see after completing amoeba is consistent, that is, you can't see the load balancing, so
As we all know, in the mmm environment, the data in each database is consistent, so what you see after completing amoeba is consistent, that is, you can't see the load balancing, so
Homepage → Database Technology
Background:
Read News
How to test whether Amoeba has achieved Load Balancing
[Date:] Source: Linux Author: zuoyuezong [Font:]
As we all know, in the mmm environment, the data in each database is consistent. What you see after amoeba is consistent is that the Server Load balancer has been used, and you cannot see it.
So what should we do? Here we can use a parameter in/etc/my. cnf to implement replicate_ignore_db = test
After this parameter is added, You can restart the database to ensure that the test database does not synchronize with the test database of other databases in this database. Therefore, you can create one database and assume that you have four databases:
Master1 master2 slave1 slave2 is ready for mmm
Then you can
1. log on to master2 vim/etc/my. cnf and add replicate_ignore_db = test to restart the database.
2. log on to mysql in master1 and create a t table> use test; create table t (this varchar (10); insert into t values ('m1 '); quit;
Vim/etc/my. cnf add replicate_ignore_db = test to restart the database
3. log on to master2; mysql> use test;
> Create table t (this varchar (10); insert into t values ('m2 '); quit;
4. log on to slave1; vim/etc/my. cnf and add replicate_ignore_db = test to restart the database.
5. log on to master2; mysql> use test; insert into t values ('m1m2iss2 '); quit;
In this way, the data in the t table will be different.
0
MySQL installation script can be installed only after execution
Install MySQL 5.5.35 in CentOS 6.3
Relevant information Amoeba
Use Amoeba to implement MySQL read/write splitting (17:11:37)
Amoeba implements MySQL Master/Slave read/write splitting (08:30:28 on 06/2011)
Image Information
Use Amoeba to implement MySQL
View All comments in this article (0)
Comments
Latest Information
Popular this week
Introduction to Linux community-advertisement service-website map-help Info-contact us
The articles published on this site (LinuxIDC) do not mean that they agree with the statement or description. They only provide more information and do not constitute any suggestions.
Copyright©2006-2011 Linux community All rights reserved Zhejiang ICP backup No. 06018118