This guide explains how to remove a MySQL user through SSH. The MySQL user is an entry in the USER table of the MySQL server that provides the host information, login information, and account privileges for the MySQL account.
Let us follow a few steps:
- Log in to your Server through SSH.
- Access MySQL prompt.
- Choose the database “MySQL”.
- The database name needs to be replaced as shown below.
mysql> use mysql;
mysql> DELETE FROM user where user=’mysqltest’;
mysql> FLUSH PRIVILEGES;
- The username should be changed to the username of the user you want to remove. Additionally, choose the relevant table where the user records are stored. Run this under the root user or a user account with the necessary rights according to the grant tables.
In this manner, you can remove a MySQL user using SSH. If you encounter any issues while doing this you can contact our support staff.