1446
MySQLERRORNotableSecurity / PrivilegesHIGH confidence
Definer is not fully qualified — must be user@host
Production Risk
Low — DDL will fail; correct the DEFINER syntax.
What this means
ER_MALFORMED_DEFINER (1446, SQLSTATE HY000) is raised when a DEFINER clause in a view, stored routine, trigger, or event is not in the valid user@host format.
Why it happens
- 1DEFINER specified as just a username without the @host part
- 2Host part missing or malformed in the DEFINER clause
How to reproduce
trigger — this will error
trigger — this will error
CREATE DEFINER = 'myuser' -- Missing @host VIEW my_view AS SELECT 1;
expected output
ERROR 1446 (HY000): Malformed definer: 'myuser' — definer must be in user@host format
Fix
Specify the fully qualified definer
Specify the fully qualified definer
CREATE DEFINER = 'myuser'@'localhost' VIEW my_view AS SELECT 1;
Why this works
The DEFINER must always include both username and host in 'user'@'host' format.
Sources
Official documentation ↗
MySQL 8.0 — 1446 ER_MALFORMED_DEFINER
Content generated with AI assistance and reviewed for accuracy. Found an error? hello@errcodes.dev