1269
MariaDBERRORNotableAccess ControlHIGH confidence

Cannot drop one or more of the requested users

Production Risk

Low — DROP fails; no data or privileges are changed.

What this means

ER_DROP_USER (1269, SQLSTATE HY000) is raised when a DROP USER statement fails because one or more of the specified users do not exist in the mysql.user table. Without IF EXISTS, all named users must exist.

Why it happens
  1. 1Attempting to DROP a user account that does not exist
  2. 2Misspelling the username or host in DROP USER
How to reproduce
trigger — this will error
trigger — this will error
DROP USER 'nonexistent_user'@'localhost';  -- ERROR 1269

expected output

ERROR 1269 (HY000): Can't drop one or more of the requested users

Fix 1

Use IF EXISTS to avoid the error

Use IF EXISTS to avoid the error
DROP USER IF EXISTS 'nonexistent_user'@'localhost';

Why this works

IF EXISTS suppresses the error when the user does not exist, making the operation idempotent.

Fix 2

Verify the user exists before dropping

Verify the user exists before dropping
SELECT User, Host FROM mysql.user WHERE User = 'nonexistent_user';

Why this works

Check the mysql.user table to confirm the exact username and host before dropping.

Version notes

Sources
Official documentation ↗

MySQL 8.0 — 1269 ER_DROP_USER

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

← All MariaDB errors