Link to home
Start Free TrialLog in
Avatar of rgb192
rgb192Flag for United States of America

asked on

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

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:
https://www.experts-exchange.com/questions/28394911/data-from-mysql.html

I retrieved databases from wamp upgrade then restore
by copying
\data\mysql\
into current \data
Avatar of mankowitz
mankowitz
Flag of United States of America image

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.
Avatar of rgb192

ASKER

only root
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.
Avatar of rgb192

ASKER

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
ASKER CERTIFIED SOLUTION
Avatar of mankowitz
mankowitz
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of rgb192

ASKER

well I have the files.  how can I read these files
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)
Avatar of rgb192

ASKER

lost

Thanks