<!-- 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.