how i retrieve the users password from mysql database

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • santhanalakshmi
    New Member
    • May 2009
    • 147

    how i retrieve the users password from mysql database

    Hi,

    Please help me out.....

    I have created an user in the Mysql database with the password.

    user : san
    password : san

    when i run this query :

    select host,user,passw ord from user ;
    my password has been saved like this:(in encrypted form)
    *F9DCEA38BC61CA BE87B60ACE7635F 05473FA90AB


    How i can retrieve my password in decrypted form :


    please help me out ? is it possible
  • dgreenhouse
    Recognized Expert Contributor
    • May 2008
    • 250

    #2
    If the stored value is a hash, you won't be able to retrieve it. You'll need to re-issue a password to the user.

    If the passwords are TRULY encrypted (unlikely) then you'd need the algorithm used for encryption and the key.

    By the way, that looks like a uppercased sha hash.

    Comment

    • Atli
      Recognized Expert Expert
      • Nov 2006
      • 5062

      #3
      Hey.

      This is the MySQL users table, not a table belonging to one of your own databases, right?

      If so then no, dgreenhouse is right. You can not retrieve the password. The MySQL user passwords are encrypted (hashed) using the PASSWORD() function, which uses a one-way encryption algorithm.

      The best you can do to re-enable a MySQL user with a lost password is to reset the password using the SET PASSWORD command.
      For example:
      [code=sql]SET PASSWORD FOR 'username'@'hos t' = PASSWORD('newpa ss');[/code]
      Note that to set the password for an account other that the account you are currently logged in as, you need to be logged in as root, or a user with the UPDATE privilege on the mysql database.

      Comment

      Working...