Definer is used in views, stored procedures, triggers, and events. Definer does not restrict the permission to invoke objects, instead the permission to access the database. If you select Yes for Migrate Definer to User during MySQL migration, the Definers of all source database objects will be migrated to the user. The user continues to use the original services without authorization. (Users, permissions, and passwords are migrated). Other users do not have permissions on database objects unless these users are authorized.
The following procedures describe how to use database commands to authorize users.
show grants for 'user'@'host';
grant select,insert,update,delete on db_name.* to 'user'@'host';
Generally, the permissions to access the database are as follows: SELECT, CREATE, DROP, DELETE, INSERT, UPDATE, INDEX, EVENT, CREATE VIEW, CREATE ROUTINE, TRIGGER, and EXECUTE. You need to check the permissions that are missing based on the database object, and then perform the authorization operation.
For stored procedures and functions, ensure that the user has the EXECUTE permission. The authorization command is as follows:
grant execute on db_name.function_name to 'user'@'host';
grant select on mysql.proc to 'user'@'host';