Where are MySQL passwords stored and are they encrypted or even hashed?

3 Answers 3


MySQL passwords are stored in the user table of the mysql database and are encrypted using it's own algorithm.

You can find more information in the MySQL documentation

  • The encryption algorithm is essentially SHA1 Nov 1, 2011 at 17:52

MySQL passwords for users are stored within MySQL itself; they are stored in the mysql.user table. The passwords are hashed by default using the PASSWORD() function, however there are other alternatives, though none are plain-text.


I guess that you mean the database privileges... They are stored in the schema and privilege tables. More specific info is available here:


  • Why would you assume they mean database privileges when the OP specifically states passwords?
    Nov 1, 2011 at 13:20
  • What I meant was that the OP really wanted the table that holds the global database user list (with passwords) and their privileges... not simply a user created "user authentication" table. Since the question was very vague, it is hard to determine it's true purpose. Nov 1, 2011 at 13:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.