我就是用的5.7.21:
"RepoTags": [
"docker.io/percona/percona-xtradb-cluster:5.7.21",
"pxc:latest"
],
查看mycat.log:
WARN [$_NIOREACTOR-0-RW] (io.mycat.backend.mysql.nio.MySQLConnectionAuthenticator.handle(MySQLConnectionAuthenticator.java:91)) - can't connect to mysql server ,errmsg:Unknown database 't2' MySQLConnection@1144073788 [id=5, lastTime=1578791053185, user=root, schema=t2, old shema=t2, borrowed=false, fromSlaveDB=false, threadId=252, charset=latin1, txIsolation=3, autocommit=true, attachment=null, respHandler=null, host=192.168.10.103, port=9004, statusSync=null, writeQueue=0, modifiedSQLExecuted=false]
我的schema.xml:
<schema name="t2" checkSQLschema="false" sqlMaxLimit="100">
<table name="teacher" dataNode="tdn3,tdn4" type="global"/>
<table name="student" dataNode="tdn3,tdn4" rule="mod-long"/>
</schema>