Getting mysql password !Not resetting it! I need to get it.

jazzIIIlove
jazzIIIlove used Ask the Experts™
on
Hi there;

I need to get mysql password without resetting it. Is it crypted? Where is it?

Best regards.
P.S. The reason is I need to reach remote mysql server of my friend, I connect the machine via SSH, yet, since he is away, and I am unable to reach him, I need to find it. I cannot reset it since there are sites running on this mysql server with those credentials.

Best regards.
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
IT Supervisor
Top Expert 2009
Commented:
To answer your question in the short way, no you cannot get it.  It is encrypted (stored in the mysql.user table).

I strongly recommend that you do NOT do the following... keep calling/emailing/texting your friend instead.

If you really, really, need to do this *and* you have Admin/root access to your friends machine you can:

1) Shut down mysql
2) Restart mysql, adding the "--skip-grant-tables" option (look at the MySQL on how to do this for your OS)
3) Anybody can connect to your MySQL database now (not good!)
4) Quickly copy the existing user table:   mysqldump mysql user > user.sql
5) Reset the password you need to reset
6) Shut down mysql
7) Restart mysql *without* the "--skip-grant-tables" option
>>3) Anybody can connect to your MySQL database now (not good!)
Nope.

>>5) Reset the password you need to reset
Nope. This will ruin.

>>I strongly recommend that you do NOT do the following... keep calling/emailing/texting your friend >>instead.

>>no you cannot get it.

Is it encrypted as md5 or which algorithm? I mean this is just for curiosity.

Best regards.
Nem SchlechtIT Supervisor
Top Expert 2009
Commented:
Sorry, those were *steps*.  If you did #1 & #2, and thus started the server with "--skip-grant-tables" enabled, then *yes* anybody could connect (#3), etc.


It's SHA1, but double encrypted (password is encrypted to SHA1, then that result is encrypted in SHA1).
ok...thank you...
swift...I will wait for him.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial