mySql中The user specified as a definer ('root'@'%') does not exist

background

Recent field guide to the libraries, discovery error, saw a view of the error, navicat look, whoops, direct error. The user specified as a definer ( 'root' @ '%') does not exist.

Solution

Because people view when it is created

he chose to define who can execute. So when you switch to another user course not.

Solution 1

If you have only the current user, you do not have the root password, it is recommended that you delete the current view, copy good statement, re-established.

Solution 2

If you have permission to input commands for advanced users

grant all privileges on *.* to root@"%" identified by ".";
flush privileges;

Into the root user you want to authorize.

Solution 3

The scope of change

add another point

For safety in view of the add.

definer

When defined as DEFINER, there must be DEFINER specified user database, and the user has the corresponding operating authority to execute successfully. Is there nothing to do with the current user privileges.

invoker

When defined as INVOKER, as long as the executor has execute permissions, you can perform successfully.

Guess you like

Origin www.cnblogs.com/jichi/p/11972847.html