Authentication to host '192.168.0.14' for user 'root' using method 'mysql_native_password' failed with message: Reading from the stream has failed 

The error occurs at the time of opening the connection. And through Workbench, I calmly connect to the database with the same login and password.

Here is the code snippet where this error occurs:

 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(); } 

Server version of mysql (RHEL): 14.4 Distrib 5.7.11

Connector version for .net: 6.9.8 (downloaded from the official site). Also tried version 7.0.2

    2 answers 2

    Problem solved.

    It worked with this connector MySQL Connector NET 6.8.3

      Try disabling Pooling connections (add "Pooling = False;" in the ConnectionString) https://bugs.mysql.com/bug.php?id=76597

      • Tried - did not help. I re-read all the reports on the official website - I saw a lot of applications with a similar problem, but I did not see a solution there ((( - tailer73