#(1.2的`nohup /usr/local/amoeba/bin/amoeba start 2>&1 >/dev/null`) /usr/local/amoeba/bin/launcher log4j:WARN log4j config load completed from file:D:openSourceamoeba-mysql-1.2.0-GAconflog4j.xml log4j:WARN ip access config load completed from file:D:openSourceamoeba-mysql-1.2.0-GA/conf/access_list.conf 2010-07-03 09:55:33,821 INFO net.ServerableConnectionManager - Server listening on 0.0.0.0/0.0.0.0:8066.
设置mysql主从服务器的允许访问的用户和地址
client端调用与测试
1)在装有mysql客户端的机器上使用:
1
mysql -uroot -p123456 -P3306 -h192.168.152.146
参数分别是amoeba的用户名、密码、端口号和所做主机的地址.
2)调用与测试
首先插入一条数据:
1
insert into zone_by_id(id,name) values(20003,'name_20003')
通过查看master机上的日志 /var/lib/mysql/mysql_log.log:
1 2 3 4 5 6 7 8 9 10 11 12
100703 11:58:42 1 Query set names latin1 1 Query SET NAMES latin1 1 Query SET character_set_results = NULL 1 Query SHOW VARIABLES 1 Query SHOW COLLATION 1 Query SET autocommit=1 1 Query SET sql_mode='STRICT_TRANS_TABLES' 1 Query SHOW VARIABLES LIKE 'tx_isolation' 1 Query SHOW FULL TABLES FROM `amoeba_study` LIKE 'PROBABLYNOT' 1 Prepare [1] insert into zone_by_id(id,name) values( , ) 1 Prepare [2] insert into zone_by_id(id,name) values( , ) 1 Execute [2] insert into zone_by_id(id,name) values(20003,'name_20003')
100703 11:58:42 2 Query insert into zone_by_id(id,name) values(20003,'name_20003')
得知slave同步执行了这条语句. 然后查一条数据:
1
select t.name from zone_by_id t where t.id = 20003
通过查看slave机上的日志 /var/lib/mysql/mysql_log.log:
1 2 3 4
100703 12:02:00 33 Query set names latin1 33 Prepare [1] select t.name from zone_by_id t where t.id = 33 Prepare [2] select t.name from zone_by_id t where t.id = 33 Execute [2] select t.name from zone_by_id t where t.id = 20003