I just added a password to the admin user but now I can't open admin page of mysql through xampp without getting an error:#1045 - Access denied for user 'root'@'localhost' (using password: NO). How do I log on?
[RESOLVED] logging on to mysql through xampp
I've never bothered with XAMP/WAMP/etc. etc. before, so I can't really help you with the specifics.
All I can suggest is that you look for some sort of configuration file (or search for the SQL server connection and see where it's getting the parameters - either hard coded or otherwise) and insert the correct password.
EDIT: By the way... by "admin page," did you really mean phpMyAdmin?
Yes, I mean phpMyAdmin. I tried changing the config.inc.php file where it has a field for password. This didn't help.
Originally the way I changed the password was actually editing the password field in the user table of MySQL. Did I change the password incorrectly?
If you have a table in phpmyadmin, and change the password for a user in that table, that has nothing to do with changing the password to connect to your database via your config.inc.php file that you have made.
The config.inc.php file password is the password to connect to your database, and a table. If you want to change your password for the database, you do that through mysql databases I think it is.
grr, I wish there was an edit. xD.
You'd then have to change the password in the config.inc.php file you have to match the new password for the database that you have chosen.
david8787;10942860 wrote:Originally the way I changed the password was actually editing the password field in the user table of MySQL. Did I change the password incorrectly?
Normally the way you would set a password on an account is by running a query similar to:
SET PASSWORD FOR 'root'@'localhost' = PASSWORD('my_new_pass');
Also note that passwords are not stored in plain text format. Thus, if you modified the users table directly and just set the "password" column equal to your new password, then you've effectively broken that account and can't use it to login anymore.
This page in the MySQL manual explains how to set passwords.
EDIT: Note that if you did modify the users table correctly (e.g. using the PASSWORD() function), then you must still do one final step - flush the privileges. This page discusses the FLUSH syntax, but basically you just do:
FLUSH PRIVILEGES;
after modifying the users table. Again, modifying the users table directly is not the recommended method of changing passwords.
If you've locked yourself out and can't login as any other account that has permissions to change passwords, you can reset the 'root' account's password by following the steps here.
Thanks for the detailed responses. I guess I should have never changed the password like that.