我正在尝试设置 maxscale 以使用 schemarouter 和 readwritesplit。我的 mysql 数据库有很多分片。每个分片都有一个从属所以我们的想法是在 master 上使用一个 schemarouter,在 slave 上使用一个 schemarouter 来代理所有分片。然后在 readwritesplit 中使用这 2 个服务。
This cause the following issue:
2017-02-10 14:57:48 error : Failure loading users data from backend [10.161.66.145:4009] for service [Splitter Service]. MySQL error 2013, Lost connection to MySQL server at 'handshake: waiting for inital communication packet', system error: 110
2017-02-10 14:57:52 error : Failure loading users data from backend [10.161.66.145:4008] for service [Splitter Service]. MySQL error 2013, Lost connection to MySQL server at 'reading authorization packet', system error: 110
2017-02-10 14:57:52 error : Unable to get user data from backend database for service [Splitter Service]. Failed to connect to any of the backend databases.
你能帮忙的话,我会很高兴。
我的架构路由器都工作正常。这是 readwritesplit 配置:
[max_ro]
type=server
address=10.10.10.10
port=4009
protocol=MySQLBackend
[max_rw]
type=server
address=10.10.10.10
port=4008
protocol=MySQLBackend
[Splitter Service]
type=service
router=readwritesplit
servers=max_ro,max_rw
user=maxscale
passwd=maxscale
[Splitter Listener]
type=listener
service=Splitter Service
protocol=MySQLClient
port=4010
谢谢