Howtos / Articles

Delete a user from a MySQL server

This howto outlines the steps to remove a user from a MySQL server.

Run the MySQL client:

$ mysql -u root -p

You will be asked for a password. If you don’t have a password set, simply press enter when prompted.

Run the following command to delete the user:

DROP USER 'usertodelete'@'localhost';

This deletes the user called ‘usertodelete’. Change the user name and host values as required.

Flush the privileges to make sure the dropped user has been removed:

FLUSH PRIVILEGES;

Exit the MySQL client:

exit


Share this howto article!
  • Facebook
  • Twitter
  • Reddit
  • email

Leave a Reply

  

  

  

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>