Solved

I forget the other usernames/passwords so I would like to restore if possible

Posted on 2014-03-22
8
234 Views
Last Modified: 2014-03-30
I am doing 2 php tutorials which have different databaseName/userName/userPassword but still use localhost

I all the databaseNames have been restored with access for user 'root'
I forget the other usernames/passwords so I would like to restore if possible

related question:
http://www.experts-exchange.com/Web_Development/Web_Languages-Standards/PHP/Q_28394911.html

I retrieved databases from wamp upgrade then restore
by copying
\data\mysql\
into current \data
0
Comment
Question by:rgb192
  • 4
  • 4
8 Comments
 
LVL 24

Expert Comment

by:mankowitz
ID: 39948607
First, make sure that the new user table is present. Do this

select * from mysql.user

This should give you a list of users with hashed passwords. The hard part is that the hashed passwords may not work on a new installation, if the password() function is different.
0
 

Author Comment

by:rgb192
ID: 39948656
only root
0
 
LVL 24

Expert Comment

by:mankowitz
ID: 39948693
so it didn't bring the tables across.

See if you have a directory from the old installation, something like this

C:\wamp\bin\mysql\mysql5.1.53\data\mysql

In there should be files like

user.frm
user.myd
user.myi

copy those to the new installation and see if it works.
0
Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

 

Author Comment

by:rgb192
ID: 39948755
user.frm
user.myd
user.myi

are already in

C:\wamp\bin\mysql\mysql5.6.12\data\mysql



I can only find user.xxx in this one location

so I may have copied already from old to new

I do not know the exact steps I took in the previous question
0
 
LVL 24

Accepted Solution

by:
mankowitz earned 500 total points
ID: 39950135
the username data is stored in those files. If you search your whole disk and the user.xxx files only exist in your current installation, then they are lost (unfortunately).
0
 

Author Comment

by:rgb192
ID: 39951835
well I have the files.  how can I read these files
0
 
LVL 24

Expert Comment

by:mankowitz
ID: 39952022
you need mysql to read them (you can pop them into a hex editor, but it may be difficult).

1. make a backup
2. stop the server
3. copy the old files on top of the new ones
4. start the server (fingers crossed)
0
 

Author Closing Comment

by:rgb192
ID: 39964920
lost

Thanks
0

Featured Post

Backup Your Microsoft Windows Server®

Backup all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
php mysql if then statement syntax 4 40
mysql between clause 2 21
How to import sql database into mysql workbench 18 34
change database name 2 28
Both Easy and Powerful How easy is PHP? http://lmgtfy.com?q=how+easy+is+php  Very easy.  It has been described as "a programming language even my grandmother can use." How powerful is PHP?  http://en.wikipedia.org/wiki/PHP  Very powerful.  But a…
Introduction Since I wrote the original article about Handling Date and Time in PHP and MySQL (http://www.experts-exchange.com/articles/201/Handling-Date-and-Time-in-PHP-and-MySQL.html) several years ago, it seemed like now was a good time to updat…
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

808 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question