If you have an outdated or unused account in your MySQL or MariaDB database, it’s best to get rid of it. Having even one extra user is an additional vulnerability and attack surface in the database. In this guide, we’ll show you the step by the step instructions to delete a specific user from a MySQL or MariaDB database from the command line on a Linux system.
If you’ve forgotten the password to a user account and need to reset it, there’s no need to delete it and start over. We have separate guides for changing a user password in MySQL and changing the root password in MySQL.
In this tutorial you will learn:
- How to delete a user from MySQL/MariaDB database