关于mysql:MySql-80-root-账号连接失败

在我的 .NET 程序中连贯 MySql Server 8.0 数据库失败,残缺的谬误音讯是:Authentication to host ‘localhost’ for user ‘root’ using method ‘mysql_native_password’ failed with message: Access denied for user ‘root’@’localhost’ (using password: YES)。

执行以下 SQL 语句即可:

ALTER USER 'username'@'localhost' IDENTIFIED WITH mysql_native_password BY '123456';
FLUSH PRIVILEGES;

留神下面的明码须要替换成本人的理论明码。

评论

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注

这个站点使用 Akismet 来减少垃圾评论。了解你的评论数据如何被处理