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