Deleting user accounts in MySQL

The DROP USER statement is used to delete MySQL accounts and their privileges.

DROP USER 'accountuser'@'localhost';

If you wish to delete multiple user accounts then you can enter them comma separated as shown below:

DROP USER 'accountuser1'@'localhost', DROP USER 'accountuser2'@'localhost';

If you specify only the user name part of the account name, a host name part of ‘%’ is used.

Leave a Comment

Back to top