VB.net和mysql连接报错MySql.Data.MySqlClient.MySqlException的解决

在vb.net 2017 community中设置datagrid控件,连接mysql测试正常,但是调试时候报如下故障。
MySql.Data.MySqlClient.MySqlException:“Authentication to host 'localhost' for user 'root' using method 'mysql_native_password' failed with message: Access denied for user 'root'@'localhost' (using password: NO)”

解决方式如下: 建立一个新的普通用户,删除原来的mysql连接,建立新的mysql连接。用新的用户查询数据成功。

 

posted @ 2021-03-15 15:47  ZhongciWang  阅读(907)  评论(0)    收藏  举报