PDF (A4) - 35.2Mb
Man Pages (TGZ) - 256.4Kb
Man Pages (Zip) - 361.2Kb
Info (Gzip) - 3.4Mb
Info (Zip) - 3.4Mb
MySQL Globalization
MySQL Information Schema
MySQL Installation Guide
MySQL and Linux/Unix
MySQL and macOS
MySQL Partitioning
MySQL Performance Schema
MySQL Replication
Using the MySQL Yum Repository
MySQL Restrictions and Limitations
Security in MySQL
MySQL and Solaris
Building MySQL from Source
Starting and Stopping MySQL
MySQL Tutorial
MySQL and Windows
MySQL NDB Cluster 7.5
DROP USER [IF EXISTS]user [,user] ... TheDROP USER statement removes one or more MySQL accounts and their privileges. It removes privilege rows for the account from all grant tables.
To useDROP USER, you must have the globalCREATE USER privilege, or theDELETE privilege for themysql system database. When theread_only system variable is enabled,DROP USER additionally requires theSUPER privilege.
An error occurs if you try to drop an account that does not exist. If theIF EXISTS clause is given, the statement produces a warning for each named user that does not exist, rather than an error.
Each account name uses the format described inSection 6.2.4, “Specifying Account Names”. For example:
DROP USER 'jeffrey'@'localhost'; The host name part of the account name, if omitted, defaults to'%'.
DROP USER does not automatically close any open user sessions. Rather, in the event that a user with an open session is dropped, the statement does not take effect until that user's session is closed. Once the session is closed, the user is dropped, and that user's next attempt to log in fails.This is by design.
DROP USER does not automatically drop or invalidate databases or objects within them that the old user created. This includes stored programs or views for which theDEFINER attribute names the dropped user. Attempts to access such objects may produce an error if they execute in definer security context. (For information about security context, seeSection 23.6, “Stored Object Access Control”.)
PDF (A4) - 35.2Mb
Man Pages (TGZ) - 256.4Kb
Man Pages (Zip) - 361.2Kb
Info (Gzip) - 3.4Mb
Info (Zip) - 3.4Mb
MySQL Globalization
MySQL Information Schema
MySQL Installation Guide
MySQL and Linux/Unix
MySQL and macOS
MySQL Partitioning
MySQL Performance Schema
MySQL Replication
Using the MySQL Yum Repository
MySQL Restrictions and Limitations
Security in MySQL
MySQL and Solaris
Building MySQL from Source
Starting and Stopping MySQL
MySQL Tutorial
MySQL and Windows
MySQL NDB Cluster 7.5