Professional Documents
Culture Documents
................................................................................................................................. 2
................................................................................................................................. 2
................................................................................................................................. 3
1 ......................................................................................................... 3
2..................................................................................................................... 4
3................................................................................................................. 4
4..................................................................................................................... 5
5 slave ............................................................................................ 6
6 slave ............................................................................................... 6
7..................................................................................................................... 7
................................................................................................................................. 8
1 amoeba .......................................................................................................... 8
2..................................................................................................................... 8
3........................................................................................................................... 10
4................................................................................................................... 11
............................................................................................................................... 13
............................................................................................................................... 14
1 JVM ................................................................................................................. 14
2 ..................................................................................................................... 15
1
MySQL
MySQL
Master-Slave
amobe
2
1
mysql
yum install -y mysql mysql-devel mysql-server
/etc/init.d/mysqld start
chkcofig mysqld on
master mysqlmaster
slave mysqlslave
3
2
mysql
grant all privileges on . to @IP identified by
3
master master_test,
create database ; //
Use ; //
create table //
4
description ; //
Select from //
master
4
master_test
mysql my.cnf
5
server-id = 1 // ID 1
log-bin=mysql-bin //
binlog-do-db=master_test//
binlog-ignore-db=mysql //
master
5 slave
master master_test
slave
6 slave
slave mysql
master_test
6
mysql slave
7
Master master_test
7
slave
Amoeba( MySQL
MySQL MySQL SQL
Database Proxy ClientDB Server(s)
,SQL
jave jdk
1 amoeba
amoeba
8
java-1.6.0 java
amoeba.xml
Amoeba 8066 master
amoeba
pool
dbServers.xml
Master
9
server1 masterserver2 slave
10
4
master
Slave slave1
11
slave
master slave
12
Master
Slave
13
Master
Slave
1JVM
stack size JVM
14
amoeba-mysql-3.0.5-RC/jvm.properties
slave
mysql> slave stop;
mysql> change master to Master_Log_File='mysql-bin.000002',Master_Log_Pos=106;
mysql> slave start;
mysql> show slave status\G
15