MySQL Forums
Forum List  »  MySQL for Visual Studio

Unable to connect to any of the specified MySQL hosts
Posted by: Peter Hon
Date: October 23, 2020 02:49AM

I have a c# console program which read record from one main database and then update the record to other databases. It will run for 48 hours. Firstly, when running 24 hours, The following error will happen

MySql.Data.MySqlClient.MySqlException (0x80004005): Fatal error encountered during command execution. ---> MySql.Data.MySqlClient.MySqlException (0x80004005): Fatal error encountered attempting to read the resultset. ---> MySql.Data.MySqlClient.MySqlException (0x80004005): Reading from the stream has failed. ---> System.IO.IOException: The read operation failed, see inner exception. ---> System.TimeoutException: Unable to read data from the transport connection: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond. ---> System.IO.IOException: Unable to read data from the transport connection: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond. ---> System.Net.Sockets.SocketException: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond


So I think it is caused by exceeds of maximum connection. Then I set the wait_timeout of MySQL to 60 seconds. The above exception not appeared again. But now when running for 24 hours, another error occurs, it is :

MySql.Data.MySqlClient.MySqlException (0x80004005): Unable to connect to any of the specified MySQL hosts.
at MySql.Data.MySqlClient.NativeDriver.Open()

I am wondering what is the possible cause of the above error. Please help.

Options: ReplyQuote


Subject
Views
Written By
Posted
Unable to connect to any of the specified MySQL hosts
708
October 23, 2020 02:49AM


Sorry, only registered users may post in this forum.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.