Atlas中间件遇到的问题,求大神解惑!

Aeon37 发布于 2016/04/26 15:02
阅读 712
收藏 0
环境:
主库:192.168.5.10:3306
从库:192.168.5.11:3306
Atlas:192.168.5.12

主从库已经做好AB复制并对Atlas帐号进行授权



Atlas配置文件:
[mysql-proxy]
admin-username = admin
admin-password = 123
proxy-backend-addresses = 192.168.5.10:3306
proxy-read-only-backend-addresses = 192.168.5.11:3306
pwds = atlas:/iZxz+0GRoA=
daemon = true
keepalive = true
event-threads = 2
log-level = message
log-path = /usr/local/mysql-proxy/log
sql-log = ON
sql-log-slow = 10
instance = test
proxy-address = 192.168.5.12:3307
admin-address = 192.168.5.12:3308
charset = utf8



登录管理接口
[root@bjsoft12 conf]# mysql -h192.168.5.12 -P3308 -uadmin -p123
mysql> select * from backends;
+-------------+-------------------+-------+------+
| backend_ndx | address           | state | type |
+-------------+-------------------+-------+------+
|           1 | 192.168.5.10:3306 | down  | rw   |
|           2 | 192.168.5.11:3306 | down  | ro   |
+-------------+-------------------+-------+------+

两个库都为down



登录工作接口
[root@bjsoft12 conf]# mysql -h192.168.5.12 -P3307 -uatlas -p123456
mysql> show databases;
ERROR 2006 (HY000): MySQL server has gone away
No connection. Trying to reconnect...
Connection id:    2
Current database: *** NONE ***

ERROR 2013 (HY000): Lost connection to MySQL server during query


因为对MySQL不是很会,研究了许久也没研究出什么,求大神解惑!~


补充:我从Atlas服务器上直接远程登录主从库都可以正常连接        

加载中
返回顶部
顶部