What exactly this error is?

asp.net, database-connection, mysql

Solution

The source code for the stored procedures that you have been loading probably contain "DEFINER=root@'%'" as part of the definition - looking a bit like this:

create definer='root'@'%' procedure sp_test() begin end;

The problem here is that you do not have an account on your system for 'root'@'%'. This can be easily demonstrated. From the MySQL command line:

show grants for 'root'@'%';

I expect that this will come back with an error message:

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

The fix is to alter the source of your stored procedures, or to create the missing account:

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

It is not generally a good idea to have such a high-powered account accessible from anywhere, but that is another story.

Problem

Database i am using is MySQL 5.1. I specified, i believe, right connectionstring in my web.config. but when i run my web app. it throws this exception:- MySql.Data.MySqlClient.MySqlException: The user specified as a definer ('root'@'%') does not exist Any help. Why am i getting this?

Original source