If you want to DROP MySQL users manually then you can check this article. Sometime we need to DROP users to resolve the issue then here is the solution:
You can run below command to DROP user:
In this command you have to replace $USER with your username and $HOST to your host name. Generally you have to use “localhost” as hostname. Also you have to use single-quotes with user and hostname.
You can check below example:
To delete all the users from your account you can use below command:
From this table you can remove all the users from your database table:
You can run below command to DROP user:
Code:
mysql mysql -e "DROP user '$USER'@'$HOST';"
You can check below example:
Code:
mysql mysql -e "DROP user 'hoststud'@'localhost';"
Code:
mysql mysql -e "delete from mysql.user where User like 'hoststud%';"
Code:
mysql mysql -e "delete from mysql.db where User like ‘hoststud%';"