asp.net – 这是什么错误?

前端之家收集整理的这篇文章主要介绍了asp.net – 这是什么错误?前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
我使用的数据库MysqL 5.1.我指定,我相信,在我的web.config中的正确的连接字符串.但是当我运行我的网络应用程序它会抛出这个异常:

MysqL.Data.MysqLClient.MysqLException: The user specified as a definer (‘root’@’%’) does not exist

任何帮助为什么我得到这个?

解决方法

您正在加载的存储过程的源代码可能包含“DEFINER = root @’%’”作为定义的一部分 – 看起来有点像这样:
create definer='root'@'%' procedure sp_test() begin end;

这里的问题是您的系统上没有“root”@“%”的帐号.这可以很容易地证明.从MysqL命令行:

show grants for 'root'@'%';

我期望这会回来一个错误信息:

ERROR 1141 (42000): There is no such grant defined for user 'root' on host '%'

修复程序是更改存储过程的来源,或创建缺少的帐户:

grant all on *.* to 'root'@'%' identified by 'password' with grant option;

从任何地方都可以访问这样一个高功率的帐户通常是个好主意,但这是另一个故事.

原文链接:https://www.f2er.com/aspnet/250801.html

猜你在找的asp.Net相关文章