The user specified as a definer (‘root’@’%’) does not exist

The newly installed MySQL 5.7 runs the springboot project today, completes a new operation, and reports the following error

The user specified as a definer (‘root’@’%’) does not exist  

After consulting a lot of data, it is concluded that this error is mainly caused by accessing the view file (without permission)

Therefore, database authorization is required. The specific operations are as follows:

1. Open CMD and log in to MySQL [MySQL – uroot – P password]. If you are in the database visualizer, skip the first step

2. Execute statement: grant all privileges on *. * to root @ “%” identified by “.”;

3. Refresh: flush privileges;

4. Complete

Similar Posts: