<!-- mysql port -->
<property name="port">3306</property> #后端mysql的端口 <!-- mysql schema -->
<property name="schema">amoeba</property> #后端mysql的默认连接数据库
<!-- mysql user --> <property name="user">root</property> #连接后端mysql的账户
<!-- mysql password
<property name="password">password</property>
-->
<property name="password">amoebapass</property> #连接后端mysql使用的密码
</factoryConfig>
<dbServer name="test1" parent="abstractServer">
<factoryConfig>
<!-- mysql ip -->
<property name="ipAddress">192.168.1.141</property> #后端MySQL的ip
</factoryConfig>
</dbServer>
<dbServer name="test2" parent="abstractServer">
<factoryConfig>
<!-- mysql ip -->
<property name="ipAddress">192.168.1.142</property>
</factoryConfig>
</dbServer>
在后端代理mysql上给amoeba授权,在192.168.1.141上执行如下操作:
grant all on *.* to ‘root‘@‘192.168.1.121‘ identified by ‘amoebapass‘;(不用在备库执行,会自动同步过去)
所有的东西配置好以后就可以开始启动amoeba了,执行:/usr/local/amoeba/bin/amoeba可能会遇到以下错误:
The stack size specified is too small, Specify at least 160k Could not create the Java virtual machine.