Purpose
You can use this statement to drop one or more database users.
Notice
- To execute this statement, you must have the global
CREATE USERprivilege.- You can drop the
mysql.usertable only by performing theDROPoperation, but not theDELETEoperation.- After you drop a user, all its privileges are dropped along with it.
Syntax
DROP USER user_name [, user_name...];
Parameters
| Parameter | Description |
|---|---|
| user_name | The username. Multiple usernames must be separated with commas (,). |
Examples
Delete a user named sqluser01.
obclient>DROP USER sqluser01;
Query OK, 0 rows affected (0.02 sec)