Bug #75871 Reading from the stream has failed.

Submitted: 12 Feb 2015 9:07 Modified: 12 Feb 2015 9:24
Reporter: Peter Lee Email Updates:
Status: Duplicate Impact on me:
None 
Category:Connector / NET Severity:S1 (Critical)
Version:6.8.3 OS:Windows
Assigned to: CPU Architecture:Any

[12 Feb 2015 9:07] Peter Lee
Description:
I have a source code as the following

On_StartUp()
{
    myConnection = new MySqlConnection(....);
    myConnection.Open()
}

// Loop for this function
Timer_Event()
{
    CheckConnection();

    // read data from database
    MySqlCommand objCommand = new MySqlCommand(strCommand, myConnection);
    MySqlReader objReader = objCommand.ExecuteReader();
    .....
}

CheckConnection()
{
    if(!myConnection.Ping())
    {
        myConnection.Open();
    }
}

How to repeat:
At the nights, or weekends, the below exception some time occur:
Authentication to host '' for user '_user' using method 'mysql_native_password' failed with message: Reading from the stream has failed.
   At MySql.Data.MySqlClient.Authentication.MySqlAuthenticationPlugin.AuthenticationFailed(Exception ex)
   At MySql.Data.MySqlClient.Authentication.MySqlAuthenticationPlugin.ReadPacket()
   At MySql.Data.MySqlClient.Authentication.MySqlAuthenticationPlugin.Authenticate(Boolean reset)
   At MySql.Data.MySqlClient.NativeDriver.Authenticate(String authMethod, Boolean reset)
   At MySql.Data.MySqlClient.NativeDriver.Open()
   At MySql.Data.MySqlClient.Driver.Open()
   At MySql.Data.MySqlClient.Driver.Create(MySqlConnectionStringBuilder settings)
   At MySql.Data.MySqlClient.MySqlConnection.Open()

Portions of this website are copyright © 2001, 2002 The PHP Group

Page generated in 0.049 sec. using MySQL 8.4.7-u6-cloud

Timestamp references displayed by the system are UTC.
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.