Syntax\n------\n\nDROP USER [IF EXISTS] user_name [, user_name] ... [FORCE]\n\nDescription\n-----------\n\nThe DROP USER statement removes one or more MariaDB accounts. It removes privilege rows for the account from all grant tables. To use this statement, you must have the global CREATE USER privilege or the DELETE privilege for the mysql database. Each account is named using the same format as for the CREATE USER statement; for example, 'jeffrey'@'localhost'. If you specify only the user name part of the account name, a host name part of '%' is used. For additional information about specifying account names, see CREATE USER.\n\nIf you specify an account that is currently connected, it is deleted, but the statement completes with a warning:\n\n``sql\nDropped users 'user'@'host[,...]' have active connections. Use KILL CONNECTION if they should not be used anymore.\n`\n\nThis means that the user account with all its privileges is still active until the connection is terminated. As the warning implies, use a KILL CONNECTION statement to terminate a connection, or (more proactively) use the FORCE clause to forcibly close connections of the users named in the DROP USER statement. This ends connections, and immediately deletes the users.\n\nIn Oracle mode, if a user is connected, the DROP USER statement fails with an error:\n\n`sql\nOperation DROP USER failed for 'foo'@'localhost'.\n`\n\nAgain, use the FORCE clause to prevent that error.\n\nIf you specify an account that is currently connected, it is not deleted until the connection is closed. The connection is not automatically closed.\n\nHowever, a deleted user cannot initiate new connections any more.\n\nIf any of the specified user accounts do not exist, ERROR 1396 (HY000) results. If an error occurs, DROP USER still drops the accounts that do not result in an error. Only one error is produced for all users which have not been dropped:\n\n`bnf\nERROR 1396 (HY000): Operation DROP USER failed for 'u1'@'%','u2'@'%'\n`\n\nFailed CREATE or DROP operations, for both users and roles, produce the same error.\n\nIF EXISTS\n\nIf the IF EXISTS clause is used, MariaDB returns a note instead of an error if the user does not exist.\n\nThe CREATE USER statement creates new MariaDB accounts. To use it, you must have the global CREATE USER privilege or the INSERT privilege for the mysql database.\n\nIf the IF EXISTS` clause is used, MariaDB returns a note instead of an error if the user does not exist.\n\nExamples\n--------\n\nDROP USER bob;\n\nDROP USER foo2@localhost,foo2@'127.%';\n\nURL: https://mariadb.com/docs/server/reference/sql-statements/account-management-sql-statements/drop-user