3

When we setup a MySQL database system, system automatically create a MySQL databse in which there are multiple tables like db,event,func,host,servers,slow_log,user_info etc. In user_info table I can get the list of users and their details by executing query like select * from user_info; except password.

But in which table MySQL store the password of every users?
ursitesion
  • 988
  • 2
  • 15
  • 26

2 Answers2

4

in the mysql db, user table

SELECT
    User,
    Password
FROM mysql.user;
silly
  • 7,789
  • 2
  • 24
  • 37
4

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.

Source

Vivek Sadh
  • 4,230
  • 3
  • 32
  • 49
  • How to unhash the password and see it? I forgot the password but i cannot change it, it has to be the default one because there are many users using it for Excel sheets. – Raul Chiarella Jan 29 '22 at 12:28