Perform a Complete Recovery of an Oracle 12c Database without the Database Recovery Advisor
Oracle Database Statistics
Basics of Password Authentication in Oracle 12c

How to Remove MySQL Accounts

You might want to remove an account from a MySQL database. In most cases, having an account that no one uses doesn’t have any negative effects. However, if you think an account has been compromised, you might want to remove it for security reasons.

To remove an account, you can use the DROP USER statement (which was added in MySQL 4.1.1), as follows:

DROP USER accountname@hostname, accountname@hostname, ...

You must use an account that has DELETE privileges on the mysql database to execute the DROP USER statement.

The behavior of DROP USER has changed through MySQL versions. As of MySQL 5.0.2, it removes the account and all records related to the account, including records that give the account privileges on specific databases or tables. However, in versions before MySQL 5.0.2, DROP USER drops only accounts that have no privileges.

Therefore, in older versions, you must remove all the privileges from an account, including database or table privileges, before you can drop that account.

  • Add a Comment
  • Print
  • Share
blog comments powered by Disqus
Basic Threats to Your Oracle 12c Database
Crystal Reports 9 Standard Toolbar
Crystal Reports 2008 Expert Tools Toolbar
Basics of Object Privileges and Management in Oracle 12c
How to Identify What MySQL Accounts Currently Exist
Advertisement

Inside Dummies.com