1484
MySQLERRORNotableSecurity / PrivilegesHIGH confidence

No such grant defined for user on host on routine (SQLSTATE 42000)

Production Risk

Low — administrative error only.

What this means

ER_NONEXISTING_PROC_GRANT (1484, SQLSTATE 42000) is raised when attempting to revoke a routine privilege that was never granted to the specified user.

Why it happens
  1. 1REVOKE EXECUTE ON PROCEDURE for a privilege that does not exist
  2. 2Incorrect database, routine name, username, or host in the REVOKE statement
How to reproduce
trigger — this will error
trigger — this will error
REVOKE EXECUTE ON PROCEDURE mydb.myproc FROM 'user'@'%';
-- Fails if grant doesn't exist

expected output

ERROR 1484 (42000): There is no such grant defined for user 'user' on host '%' on routine 'myproc'

Fix

Verify grants before revoking

Verify grants before revoking
SHOW GRANTS FOR 'user'@'%';
-- Only run REVOKE for grants that actually exist

Why this works

Listing grants first prevents attempting to revoke non-existent privileges.

Sources
Official documentation ↗

MySQL 8.0 — 1484 ER_NONEXISTING_PROC_GRANT

Content generated with AI assistance and reviewed for accuracy. Found an error? hello@errcodes.dev

← All MySQL errors