Hi, I ve forgot what i set as username and password for mysql database. How could I be able to find it out.I am using wamp server. I am a newbie in mysql and its time to get started for my first project.Please help.
A:
Open phpmyadmin, go to database and corresponding table to find it out.
Sarfraz
2010-04-24 09:53:07
You know the passwords aren't stored in plaintext right?
James
2010-04-24 09:57:38
@James Goodwin: Yes, that's true, don't know whether he is storing in plain text or encrypting it.
Sarfraz
2010-04-24 10:01:28
@Sarfraz The OP is referring to the password for the MYSQL user, not an ordinary password stored in a user created table. By default MySQL encrypts the password in the `mysql.user` table using the `PASSWORD()` function.
James
2010-04-24 10:06:39
A:
In your local system right,
go to this url : http://localhost/phpmyadmin/
In this click mysql default db, after that browser user table to get existing username and password.
Karthik
2010-04-24 09:55:51
A:
Assuming that the user you are using in phpmyadmin has the necessary privileges, you can run this query to change the root password:
UPDATE mysql.user SET Password=PASSWORD('MyNewPass') WHERE User='root';
FLUSH PRIVILEGES;
James
2010-04-24 09:57:05
Ive executed the above querry now it gives following error..#1045 - Access denied for user 'root'@'localhost' (using password: NO)
aeonsleo
2010-04-24 10:23:52
@aeonsleo: Check out the MySQL documentation for how to change the mysql root password if you have no access: http://dev.mysql.com/doc/refman/5.0/en/resetting-permissions.html#resetting-permissions-windows
James
2010-04-24 21:08:17
+1
A:
Hi there aeonsleo.
Go to this file in: WampFolder\apps\phpmyadmin[phpmyadmin version]\config.inc.php
Usually wamp is in your main hard drive folder C:\wamp\
You will see something like:
$cfg['Servers'][$i]['user'] = 'YOUR USER NAME IS HERE';
$cfg['Servers'][$i]['password'] = 'AND YOU PASSWORD IS HERE';
Try using the password and username that you have on that file.
Hope it helps.
Fábio Antunes
2010-04-25 00:09:03
@aeonsleo: Good to know. PS: Don't forget to mark as accepted the answer that as enabled you to solve your problem.
Fábio Antunes
2010-04-28 12:47:51