Atlas中间件遇到的问题,求大神解惑!
环境:
主库: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不是很会,研究了许久也没研究出什么,求大神解惑!~
主库: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服务器上直接远程登录主从库都可以正常连接
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
问题解决了吗?
selinux关闭了没?