| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
DROP USER user_name |
This command was added to MySQL 4.1.1.
It deletes a user that doesn't have any privileges.
To delete a user from MySQL, you should use the following procedure, performing the steps in the order shown:
SHOW PRIVILEGES.
See section 13.5.3.11 SHOW PRIVILEGES.
REVOKE. See section 13.5.1.1 GRANT and REVOKE Syntax.
DROP USER.
If you are using and older MySQL version you should first revoke the privileges and then delete the user with:
DELETE FROM mysql.user WHERE user='username' and host='hostname'; FLUSH PRIVILEGES; |