MySQL user management

Create a user that is allowed to log in from anywhere (with or without password ‘123’):

Create a user that is allowed to log in only from localhost:

Remove a user:

Show permissions for a user:

Grant all privileges on a specific database to a user:

Grant all privileges on all databasesto a user (optionally with right to grant to other users):

Remove permissions of a user (w.r.t. a specific database):

Remove permissions of a user globally:

References

  • [1] MySQL 5.1 Reference, Chapter 6.3 on user account security (overview)
  • [2] MySQL 5.1 Reference, Chapter 13.7.1 on user account management

Leave a Reply

Your email address will not be published. Required fields are marked *

Please type the characters of this captcha image in the input box

Please type the characters of this captcha image in the input box