This howto outlines the steps to remove a user from a MySQL server.
Run the MySQL client:
$ mysql -u root -p
You will be asked for a password. If you don’t have a password set, simply press enter when prompted.
Run the following command to delete the user:
DROP USER 'usertodelete'@'localhost';
This deletes the user called ‘usertodelete’. Change the user name and host values as required.
Flush the privileges to make sure the dropped user has been removed:
Exit the MySQL client: