MariaDB Tutorial MariaDB Advanced MariaDB Database Account Management MariaDB References

MariaDB - DROP USER



The MariaDB DROP USER statement is used to remove a user from the MariaDB database.

Syntax

The syntax of using DROP USER statement in MariaDB is given below:

DROP USER user_name;

Parameters

user_name Required. Specify the name of the user to remove from the MariaDB database.

Example: Drop a user

In the example below, the DROP USER statement is used to drop a user called john in the MariaDB database.

DROP USER 'john'@'localhost';

Example: Drop more than one user

In the example below, two user is dropped in the MariaDB database. The two users are - john and marry.

DROP USER 'john'@'localhost', 'marry'@'localhost';

5