MySQL Error 1449: The user specified as a definer ('root'@'%') does not exist

Migrating data from a database to local localhost or migrating data from local localhost to a server requires it to be a Windows server


The program reports an error when calling the view of the database, and also reports an error when directly opening the view in the database, similar to:


mysql 1449 : The user specified as a definer ('xxxx'@'%') does not exist


After investigation, it is a permission problem, the solution:

运行: grant all privileges on *.* to xxxx@"%" identified by ".";

After that, no error will be reported when the view is opened, and no error will be reported when the program is called.


Explanation of the source address:

Permission problem, authorize all sql permissions to root

mysql> grant all privileges on *.* to root@"%" identified by ".";
Query OK, 0 rows affected (0.00 sec)


mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)



Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326310377&siteId=291194637