The user specified as a definer (”@'%') does not exist Perfect solution

Scenes:

  1. Export the database data of the production environment to a sql file, such as: 1.sql
  2. Import 1.sql into a local database.

question:

  1. The user specified as a definer ("@'%') does not exist when querying the view.

 solve:   

grant create view on df.* to dfa;
grant select on df.* to dfa;

 

Description: df is the local database name, dfa is the database user name

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326990677&siteId=291194637