View Single Post
Old September 8th, 2004, 04:59 AM
ciderpunx ciderpunx is offline
Friend of Wrox
Points: 1,515, Level: 15
Points: 1,515, Level: 15 Points: 1,515, Level: 15 Points: 1,515, Level: 15
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
Join Date: Dec 2003
Location: Oxford, , United Kingdom.
Posts: 488
Thanks: 0
Thanked 3 Times in 3 Posts

> I changed the password to mysql by typing in another command but it didnt affect phpmyadmin.

Can you log in using a password to mysql from the commandline, for eg.

mysql -u phpmyadminuser -p <PASSWORD>

If you can, it probably means that there's something wrong with the phpmyadmin setup. You should check through your file
around line 70-80 reads something like:
$cfg['Servers'][$i]['auth_type'] = 'config'; // Authentication method (config, http or cookie based)?
$cfg['Servers'][$i]['user'] = 'phpmyadminuser'; // MySQL user
$cfg['Servers'][$i]['password'] = 'the_password';

> What exact steps do i need to type in dos to recover the password for PHPMYADMIN.

The old password should be set in the file above, so it's really just a case of :
+ locate
+ edit it using edit or notepad or jedit or whatever.
+ the old password should be set up as above.

 If it isn't there, then you should first set a new password for the appropriate user in mysql like:

C:> mysql -u mysqladmin -p
USE mysql;
UPDATE user SET password=PASSWORD('yournewpass') WHERE user='phpmyadminuser' ;
FLUSH privileges ;

 Then alter the above lines of so that username and password reflect the new password.

 If you really need to recover the password, rather than set a new one, and its not in, you'll have to copy the encrypted one out of the appropriate row in the user table, and run a password cracker like john the ripper on it. I'll leave this for another post :-)

Don't Stand on your head - you'll get footprints in your hair.