Knowledge Base
MilesWeb / Web Hosting FAQ

How to delete a MySQL user ?

Approx. read time : 2 min

If you wish to delete a MySQL user, login to your server via SSH & access MySQL prompt.

MySQL prompt

Select the database mysql & follow the steps below. Here, the database is mysql. Replace the database name as desired.

mysql> use mysql;
mysql> DELETE FROM user where user=’username’;

Replace ‘username’ with the username of the user you wish to delete. Also, select the correct table which has the user records stored. You have to run this as the root user or an account that has appropriate privileges on the grant tables.

Need help? We’re always here for you.