后台程序
I am developing a .net project,whichworkswithxfdsyandmysqldb.forhighavailability,I am using Galera cluster,soIhave3MySQLmaster
accordingtoconnectionstring.comishouldbeabletousethefollowingconnectionstring 3360
Server=master1、master2、master3; 数据库=my database;
Uid=myUsername; Pwd=myPassword;
I have tried the above,anditdoesnotwork . ihaveseenthisbugwhichexplainsmulti-hostconnectionstringdoesnotwork。
队列
accordingtothislinkicanusemysql : load balance : infrontofmyjdbcconnectionstring.theproblemisidon ' t know which使命蜻蜓amiu DTH estandard/defaultnugetpackagesfor.net (MySQL.dataandmysql.data.entity framework ).anyideawork )。
anyideahowcaniusemysqlconnectortoloadbalance/connect the3master nodes?
thisisn ' tsupportedbymysql.data.asyou observed,therearemultiplebugreports (# 81650,#88962 ) pointing out this problem,
As explained here,there is an alternative幸福魔镜,明理龙猫,thatdoessupportthisconnectionstringsyntax.unfortunately, thereisnoxfdsylibraryavailableforit.(thereisanef.core package,pomelo.entityframeworkcore.MySQL.)。
aworkaroundwouldbetocreatealayer4loadbalancerinfrontofyourthreegaleranodes.galeraprovidesdocumentationhowtodothiswithapro xpro mysqlclientwouldconnecttohaproxy,anditwouldloadbalanceconnectionsbetweenyourgaleraservers。