Bug #80921 Error in connection
Submitted: 31 Mar 2016 10:39 Modified: 1 Apr 2016 12:09
Reporter: Иван Иванов Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Server Severity:S2 (Serious)
Version:14.14 OS:Any
Assigned to: CPU Architecture:Any

[31 Mar 2016 10:39] Иван Иванов
Description:
"Authentication to host '192.168.0.14' for user 'root' using method 'mysql_native_password' failed with message: Reading from the stream has failed."

How to repeat:
conStrBilder = new MySqlConnectionStringBilder();
conStrBilder.Server = "192.168.0.14";
conStrBilder.Database = "login";
conStrBilder.UserID = "root";
conStrBilder.Password = "root";
DataTable dt = null;
var con = new MySqlConnection(conStrBilder.ConnectionString);
var command = new MySqlCommand(query, con);
try
{
    //здесь вываливается исключение
    con.Open()
    var dr = command.ExecuteReader();
    If(dr.HasRows)
    {
        dt = new DataTable();
        dt.Load(dr);
    }
}
catch(Exceprion ex)
{
    errorString = ex.Message;
}
finally
{
    con.Close();
}
[1 Apr 2016 9:32] Chiranjeevi Battula
Hello Иван Иванов,

Thank you for the bug report.
I tried to reproduce the issue at my end using Visual Studio 2013 (C#.Net) and Connector/Net 6.9.8 but not seeing any issues in connection.
Could you please provide more information like MySQL version, Connector / NET version details to confirm this issue at our end?
Please add "port" number in the connection string.

Thanks,
Chiranjeevi.
[1 Apr 2016 11:24] Иван Иванов
I am use Visual Studio 2013.
Connector .net 6.9.8
Mysql server Ver 14.14 Distrib 5.7.11
O.S. RHEL 5.9 (2.6.18-348.e15)
[1 Apr 2016 11:58] Chiranjeevi Battula
Hello Иван Иванов,

Thank you for your feedback.
Try to login into your MySQL database from the command prompt / workbench using your username/password, if it is working no problem in database side.
Please make sure your network having sufficient permissions or not.

This is most likely duplicate of Bug #75917, please see Bug #75917.

Thanks,
Chiranjeevi.
[1 Apr 2016 11:59] Chiranjeevi Battula
Screenshot.

Attachment: 80921.JPG (image/jpeg, text), 148.32 KiB.

[1 Apr 2016 12:09] Иван Иванов
Connection via MySql Workbench works well .
I read all the duplicates , but did not find the solution to your problem .
My code errors #0