[英]Authentication to host 'localhost' for user 'root' using method 'mysql_native_password' failed with message (using password: NO)
Can you help me guys for my thesis and this is one of my problem in my system.你能帮我写论文吗,这是我系统中的问题之一。
MySqlConnection cn2 = new MySqlConnection(cn.ConnectionString);
cn2.Open();-->>> Authentication to host 'localhost' for user 'root' using method 'mysql_native_password' failed with message: Access denied for user 'root'@'localhost' (using password: NO)
listView1.Items.Clear();
string sql = "Select * from tblrecord where DateTime between '" + dateTimePicker1.Value + "' and '" + dateTimePicker2.Value + "'";
cm = new MySqlCommand(sql);
//cm = new MySqlCommand(sql, cn1);
dr = cm.ExecuteReader();
dr.Read();
if (dr.HasRows)
只需在连接字符串中添加密码,因为您尚未在连接中添加密码。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.