0

year ago i installed wamp and made some projects then i stopped using it, i started it again and but mysql service was not running so i copied the www folder and uninstalled the wamp and installed it again pasted the contents of old www folder into the new one when i tried to login phpmyadmin with the old username and pass its showing error 1045. i want to ask if there is any way i can log into my old acc or not. Or is there anyway i could make a new user and shift the old databases into new user. please help. thanks in advance.

  • Does this answer your question? [Regaining access to lost MySQL password for PHPMyAdmin on WAMP](https://stackoverflow.com/questions/29070501/regaining-access-to-lost-mysql-password-for-phpmyadmin-on-wamp) – Isaac Bennetch Jul 01 '20 at 03:34

3 Answers3

0

l believe the www folder and phpmyadmin are 2 different things. www folder only stores files that you use for frontend that includes .php, .html .css, .txt, images, documents etc WHILE phpmyadmin provides you with a virtual database environment that is used to store integers, characters , strings eg when a user creates an account, we would want to store such data for future login.

Which brings us to your question's answer

You did not backup your phpmyadmin databases/users accounts hence when you reinstalled wampserver, all the accounts and databases where restored to default. The default login details after such process are

user: root

password: 'leave password field blank'

After that you can now create other user accounts and databases.

Hope this helps solve your problem

Tanaka K
  • 1
  • 4
0

If you still have the database you can. But if you lost them somehow without backing the up somewhere l afraid you might have to create new ones

Tanaka K
  • 1
  • 4
0

MySQL's databases are stored in a separate directory, called the datadir. I can't tell you where exactly WAMP puts this, but last time I checked it was not removed by default. So when you installed WAMP again, it should use the same set of databases. The error 1045 is an authentication error, which means either you're using the correct username/password combination for logging in: either you're not correctly remembering the old information, or the old database is gone and you should log in with the new defaults (which I think for WAMP are username root with a blank password).

You can use the instructions at How to change the mysql root password to reset the root password. The answer at Regaining access to lost MySQL password for PHPMyAdmin on WAMP is more specific about WAMP, but the process seems to be approximately the same.

If WAMP uses auth_type config, don't forget to change the password in phpMyAdmin's configuration file config.inc.php. I don't recall if WAMP is one of the kits that hardcodes this and uses auth_type config, or if it uses auth_type cookie and prompts you for a username and password when you load the page.

As the other answers state, your www folder is basically any custom code you have put there; the database files are not kept in that folder and anything that's a part of WAMP (such as phpMyAdmin) would be reinstalled by the installer program anyway so you wouldn't have to worry about those.

Once you gain access to the database by resetting the password, you can evaluate whether the original database still exists. If not, you'll have to restore the datadir from backup.

Isaac Bennetch
  • 11,830
  • 2
  • 32
  • 43