This MariaDB tutorial explains how to use the MariaDB DROP USER statement with syntax and examples.
The DROP USER statement is used to remove a user from the MariaDB database.
The syntax for the DROP USER statement in MariaDB is:
DROP USER user_name;
Parameters or Arguments
The name of the user to remove from the MariaDB database.
Let's look at how to drop a user in MariaDB using the DROP USER statement.
DROP USER 'fastread.aitechtonic'@'localhost';
In this example, the DROP USER statement would drop the user called fastread.aitechtonic in the MariaDB database.
Drop more than one user
How can you drop more than one user at a time in MariaDB? You can use the DROP USER statement to drop multiple users by comma separating the users that you wish to drop.
DROP USER 'fastread.aitechtonic'@'localhost', 'checkyourmath'@'localhost';
This DROP USER example would drop two users in MariaDB - fastread.aitechtonic and checkyourmath.