MySQL and passwords
Posted by: MikeSD (---.hsd1.wa.comcast.net)
Date: November 09, 2009 02:31PM

After my install of WAMP Server, I did a quick test by creating a database and table. Then I realized that nowhere was I ever asked to login or provide any password.

I have used MySQL and PHPMyAdmin on my web site, before and I have always had to specify, in setup, an account and password. When I installed WAMP server with MySQL and PHPMyAdmin, why was one never required for PHPMyAdmin and MySQL? Is there an account and password used somewhere that I'm missing or unaware of?

Options: ReplyQuote
Re: MySQL and passwords
Posted by: c2dan (---.15-1.cable.virginmedia.com)
Date: November 09, 2009 06:21PM

When MySQL is first installed it'll setup one account. Which will be root as the username that has no password set.

By default phpMyAdmin will try to connect to MySQL with the username root and no password.

You can setup a password for root user if you wish to. There are many guides on the net for setting the root password. You can setup more than one user too. Click phpMyAdmin's privileges tab to setup more users.

Options: ReplyQuote
Re: MySQL and passwords
Posted by: MikeSD (---.hsd1.wa.comcast.net)
Date: November 10, 2009 01:07AM

Oh Great!

I used [127.0.0.1]

to access phpmyadmin and it worked fine. Then I went to the privileges tab and changed the password. Now it won't let me back in. It tries to use the no password. Why doesn't it know about the one I set.

I'm getting:
"#1045 - Access denied for user 'root'@'localhost' (using password: NO) "

How do I fix this now, short of a complete reinstall. Even the console won't let me login.

Options: ReplyQuote
Re: MySQL and passwords
Posted by: MikeSD (---.hsd1.wa.comcast.net)
Date: November 10, 2009 02:03AM

*** UPDATE ***

Ok, it was relatively easy to uninstall and reinstall. Didn't have much to lose anyway. Had my PHP files saved.

But I don't want to have to go through that again. :-)

What is the "correct" procedure for changing the root password, such that the phpmyadmin scripts can login using the new password for root?

What I did was:
1) Open PHPMyAdmin using 127.0.0.1 IP
2) Clicked the Privileges tab
3) Edit the root record
4) Change Password Field: assigned a new password and generated the password
5) Change Login Information: assigned a new password (same as above) and generated the password
6) Then clicked GO

The query was executed without problem. However, I could no longer access phpmyadmin, after refreshing services. I did find a phpmyadmin script that had root and password blank and filled in the new password but that still didn't allow me to login.

Can someone please list the specific steps (all of the) for changing a password and having the phpmyadmin scripts be able to login with the new info?

Thanks,

Options: ReplyQuote
Re: MySQL and passwords
Posted by: yfastud (Moderator)
Date: November 10, 2009 02:14AM


Options: ReplyQuote


Sorry, only registered users may post in this forum.