mycat心跳的奇怪呢

来源:9-6 配置Mycat实现读写分离以及心跳检测自动切换

Superman007

2017-05-14

http://szimg.mukewang.com/59186920000150ee03500270.jpg

http://szimg.mukewang.com/591869210001afd412480841.jpg

以上配置,在112上添加数据,左边一对主从可以,右边不行.

当,把左边主(176)关闭,112上显示:

ERROR 2006 (HY000): MySQL server has gone away

No connection. Trying to reconnect...

ERROR 2003 (HY000): Can't connect to MySQL server on '115.60.12.100' (111)

ERROR: 

Can't connect to the server

重启mycate后,112可以添加了.右边主从正常.左侧数据未更新.

当把配置中,hostM1配置删除.重启后,并开启刚才关闭的176后,

4个服务器数据库都可以更新,好奇怪哦,这是哪里出错了呢?


通过112写入,或读取可以执行时,查看日志发现有问题:

2017-05-14 21:27:39.519  WARN [$_NIOREACTOR-0-RW] (io.mycat.sqlengine.SQLJob.errorResponse(SQLJob.java:129)) - error response errno:1227, Access denied; you need (at least one of) the SUPER,REPLICATION CLIENT privilege(s) for this operation from of sql :show slave status at con:MySQLConnection [id=12, lastTime=1494768459509, user=mycat, schema=imooc_shop, old shema=imooc_shop, borrowed=true, fromSlaveDB=true, threadId=12, charset=utf8, txIsolation=3, autocommit=true, attachment=null, respHandler=SQLJob [ id=0,dataNodeOrDatabase=imooc_shop,sql=show slave status,  jobHandler=io.mycat.sqlengine.OneRawSQLQueryResultHandler@48089d83], host=115.60.12.178, port=3306, statusSync=null, writeQueue=0, modifiedSQLExecuted=false]

2017-05-14 21:27:39.519  WARN [$_NIOREACTOR-0-RW] (io.mycat.sqlengine.SQLJob.errorResponse(SQLJob.java:129)) - error response errno:1227, Access denied; you need (at least one of) the SUPER,REPLICATION CLIENT privilege(s) for this operation from of sql :show slave status at con:MySQLConnection [id=8, lastTime=1494768459509, user=mycat, schema=imooc_shop, old shema=imooc_shop, borrowed=true, fromSlaveDB=false, threadId=7355, charset=utf8, txIsolation=3, autocommit=true, attachment=null, respHandler=SQLJob [ id=0,dataNodeOrDatabase=imooc_shop,sql=show slave status,  jobHandler=io.mycat.sqlengine.OneRawSQLQueryResultHandler@7413229c], host=115.60.12.176, port=3306, statusSync=null, writeQueue=0, modifiedSQLExecuted=false]


写回答

2回答

Jason

2017-05-15

176和177互相给权限了吗

0
0

Superman007

提问者

2017-05-14

肿么办呢

0
0

Yii2.0进阶版 高级组件ES/Redis/Sentry优化京东平台

进阶更高阶的Yii 2.0开发,获得2-3年yii 2.0实战经验

514 学习 · 210 问题

查看课程