amoeba实现mysql读写分离

amoeba版本:5.1.45-mysql-amoeba-proxy-2.2.0 Source distribution

主:192.168.204.128

从:192.168.204.129

amoeba:192.168.204.130

dbServers.xml文件:

     

wKioL1SpRyKRgeu2AAHjbmOQ6IY932.jpg

wKiom1SpRmbzoqrJAAJKHWk-AzQ269.jpg

amoeba.xml文件

    

wKioL1SpR4eyNpUgAAF8rwy8evU205.jpg

wKiom1SpRsuTGWcsAAIQsMXowSo826.jpg

在主从服务器上执行:

    grant all on cjnew.* to rickcj@'192.168.204.130' identified by 'cmysqlj';

启动amoeba:

    /usr/local/amoeba/bin/amoeba start

 netstat -tnlp 

      ::ffff:192.168.204.130:8066

登陆amoeba:

   mysql -uroot -p -h192.168.204.130 -P8066

    



      

    

你可能感兴趣的:(mysql,读写分离,amoeba)