This topic describes how to drop a user that you no longer need by using the DROP USER statement.
Prerequisites
To execute the DROP USER statement, you must have the global CREATE USER privilege. For more information about how to view your privileges, see View user privileges. If you do not have the required privilege, contact the administrator to obtain the privilege. For more information about how to grant privileges to a user, see Grant direct privileges.
Limitations
The DELETE statement cannot be used to delete privileges from the mysql.user table.
Procedure
Log on to a MySQL tenant of the cluster.
Execute the following statement to drop one or more users:
DROP USER user_name [, user_name...];Here,
user_namespecifies the username for the user to be dropped. To drop multiple users, separate their usernames with commas (,).After you drop a user, the database objects created by the user are not dropped. However, all privileges of the user are dropped.
For example, execute the following statement to drop the
sqluser02user:obclient> DROP USER sqluser02; Query OK, 0 rows affected
References
For more information about the DROP USER statement, see DROP USER.