Access control

All stored programs (procedures, functions, triggers, and events) and views have a DEFINER. If the DEFINER is not specified, the user who creates the object will be chosen as DEFINER.

Stored routines (procedures and functions) and views  have an SQL SECURITY characteristic with a value of DEFINER or INVOKER to specify whether the object executes in the definer or invoker context. Triggers and events have no SQL SECURITY characteristic and always execute in the definer context. The server invokes these objects automatically as necessary, so there is no invoking user.

Get MySQL 8 Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.