mysql> change master to master_host='192.168.1.101',master_user='slave',master_password='slavepasswd',master_log_file='mysql-bin.000003',master_log_pos=429;
Java(TM) SE Runtime Environment (build 1.7.0_67-b01)
Java HotSpot(TM) 64-Bit Server VM (build 24.65-b04, mixed mode)
在主库,从库里设置对amoeba-mysql服务器的远程权限
mysql> grant all on *.* to 'amoeba'@'192.168.1.100' identified by 'amoebapasswd';
Query OK, 0 rows affected (0.08 sec)
The stack size specified is too small, Specify at least 228k
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
The stack size specified is too small, Specify at least 228k
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
发现错误
The stack size specified is too small, Specify at least 228k 在amoeba程序的根目录里有一个jvm.properties 优化设置
JVM_OPTIONS="-server -Xms256m -Xmx1024m -Xss196k -XX:PermSize=16m -XX:MaxPermSize=96m" 设置为
JVM_OPTIONS="-server -Xms256m -Xmx1024m -Xss300k -XX:PermSize=16m -XX:MaxPermSize=96m" 只要大于上面提示的228K就可以了
[root@localhost bin]# ./launcher
The stack size specified is too small, Specify at least 228k
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
The stack size specified is too small, Specify at least 228k
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
log4j:WARN log4j config load completed from file:/usr/local/amoeba/conf/log4j.xml
2014-09-03 18:01:19,883 INFO context.MysqlRuntimeContext - Amoeba for Mysql current versoin=5.1.45-mysql-amoeba-proxy-3.0.4-BETA
log4j:WARN ip access config load completed from file:/usr/local/amoeba/conf/access_list.conf
2014-09-03 18:01:21,513 INFO net.ServerableConnectionManager - Server listening on 0.0.0.0/0.0.0.0:8066.
OK了,查看下端口
[root@localhost bin]# netstat -natpl
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 932/sshd
tcp 0 52 192.168.1.100:22 192.168.1.2:62555 ESTABLISHED 965/sshd
tcp 0 0 :::22 :::* LISTEN 932/sshd
tcp 0 0 :::8066 :::* LISTEN 1118/java
tcp 0 0 ::ffff:192.168.1.100:8260 ::ffff:192.168.1.101:3306 ESTABLISHED 1118/java