Bug #96561 | multiple hosts error(Unable to connect to any of the specified MySQL hosts.) | ||
---|---|---|---|
Submitted: | 16 Aug 2019 2:22 | Modified: | 16 Aug 2019 13:23 |
Reporter: | black 无 | Email Updates: | |
Status: | Duplicate | Impact on me: | |
Category: | Connector / NET | Severity: | S3 (Non-critical) |
Version: | 8.0.17 | OS: | Any |
Assigned to: | CPU Architecture: | Any |
[16 Aug 2019 2:22]
black 无
[16 Aug 2019 11:58]
black 无
My temporary solution MySQL.Data/src/common/StreamCreator.cs: public static Stream GetStream(MySqlConnectionStringBuilder settings) { Exception exception = null; string[] servers = settings.Server.Split(','); settings = new MySqlConnectionStringBuilder(settings.ConnectionString); foreach (string server in servers) { settings.Server = server; try { switch (settings.ConnectionProtocol) { case MySqlConnectionProtocol.Tcp: return GetTcpStream(settings); case MySqlConnectionProtocol.UnixSocket: return GetUnixSocketStream(settings); case MySqlConnectionProtocol.SharedMemory: return GetSharedMemoryStream(settings); case MySqlConnectionProtocol.NamedPipe: return GetNamedPipeStream(settings); } break; } catch (Exception e) { exception = e; } } if (null != exception) throw exception; throw new InvalidOperationException(Resources.UnknownConnectionProtocol); }
[16 Aug 2019 13:23]
MySQL Verification Team
Hello black 无, Thank you for the report. Imho this is duplicate of Bug #81650, please see Bug #81650 Alternatively, you can try this - https://blogs.oracle.com/mysql/how-to%3a-using-replication-load-balancing-with-connectorne... regards, Umesh