Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
BOOK: Beginning PHP, Apache, MySQL Web Development ISBN: 978-0-7645-5744-6
This is the forum to discuss the Wrox book Beginning PHP, Apache, MySQLWeb Development by Michael K. Glass, Yann Le Scouarnec, Elizabeth Naramore, Gary Mailer, Jeremy Stolz, Jason Gerner; ISBN: 9780764557446
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning PHP, Apache, MySQL Web Development ISBN: 978-0-7645-5744-6 section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old September 5th, 2004, 02:05 PM
Authorized User
 
Join Date: Sep 2004
Location: , , .
Posts: 25
Thanks: 0
Thanked 0 Times in 0 Posts
Default Forgot password for phpmyadmin

How do i recover the password and username for phpmyadmin if I forgot it. Thanks.


Reply With Quote
  #2 (permalink)  
Old September 7th, 2004, 09:36 AM
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
Default

If you have CLI access to the mysql server, you could restart mysql with -Sg (skip grant tables). When you've done that, do FLUSH PRIVILEGES; straight away, to avoid anyone else being able to connect, then use the usual grant syntax to sort out a new password/and or username.

If you don't have CLI access to the server, your isp should be able to help out.



--
Don't Stand on your head - you'll get footprints in your hair. http://charlieharvey.com
Reply With Quote
  #3 (permalink)  
Old September 7th, 2004, 11:44 PM
Authorized User
 
Join Date: Sep 2004
Location: , , .
Posts: 25
Thanks: 0
Thanked 0 Times in 0 Posts
Default

What exact commands in dos do i need to type. I do have command line access to mysql server.

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

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

Thanks alot for your previous response

Reply With Quote
  #4 (permalink)  
Old September 8th, 2004, 04:59 AM
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
Default

> 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 config.inc.php 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 config.inc.php
+ 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 config.inc.php 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 config.inc.php, 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. http://charlieharvey.com
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
forgot sa password, unable to change... help happygv SQL Server 2000 14 April 29th, 2010 02:26 AM
FORGOT EXCEL PASSWORD prasanta2expert Excel VBA 4 March 17th, 2010 05:23 AM
Chapter 7 Email setting for "forgot password?" hdpark BOOK: ASP.NET 2.0 Instant Results ISBN: 978-0-471-74951-6 10 April 23rd, 2008 02:48 PM
Please help with Chapter 3 - Using PHPMyAdmin nooten1 BOOK: Beginning PHP, Apache, MySQL Web Development ISBN: 978-0-7645-5744-6 0 March 18th, 2006 03:24 PM
Forgot password? developerz BOOK: ASP.NET Website Programming Problem-Design-Solution 1 November 30th, 2003 04:36 PM



All times are GMT -4. The time now is 04:44 AM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.