I have an app that will be supported by two MySQL servers. They reside on 2 different machine on different network and on different ports.
i found in here the following connection string for multiple servers
Server =serverAddress1 & serverAddress2 & etc..; Database =myDataBase开发者_开发百科; Uid =myUsername; Pwd =myPassword;
But how can i specify the port for each server?
That connection string is for connecting to replicated servers, it'll just chose one of them - does it matter which server you use, in your application ?
Anyway - you can't specify different port that way, so you will have to handle this yourself in your application logic, backed by 2 distinct connection strings.
精彩评论