cannot log in as root after updating password in user db

Problems with the Windows version of XAMPP, questions, comments, and anything related.

cannot log in as root after updating password in user db

Postby czimmer » 11. December 2009 18:27

I recently installed PHP and MySql using the xampp download.
The book I was trying to teach myself with stressed having the root user password protected so I entered the following:

mysql> update User
set password = 'my password'
where user = 'root';

mysql>flush privileges;

I then exited and tried to log back in as root using the new password

# mysql -u root -p
Enter password: **********

but now get the error:
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)

I appreciate any help on this.

Thanks
czimmer
 
Posts: 2
Joined: 11. December 2009 17:53

Re: cannot log in as root after updating password in user db

Postby Izzy » 11. December 2009 23:14

Missing support info - what XAMPP version and which Windows OS?

Run the \xampp\mysql\resetroot.bat file then try and access with no password.

If successful then create your password again and retry.

BTW you can also set the root user password from the Security menu item in http://localhost/index.php after running the above bat file to clear existing passwords.

Also you could use the MySQL GUI phpMyAdmin to create databases, users and user passwords and grant permissions all in a neat interface accessed by typing http://localhost/phpmyadmin in your browser.

More helpful reading for new XAMPP users:
\xampp\readme_en.txt file
or
http://www.apachefriends.org/winxampp/readme_en.txt
http://www.apachefriends.org/en/xampp-windows.html
http://www.apachefriends.org/en/faq-xampp-windows.html
Izzy
 
Posts: 3344
Joined: 25. April 2006 17:06

Re: cannot log in as root after updating password in user db

Postby czimmer » 17. December 2009 17:29

thanks for that advice. resetroot.bat got rid of the password. :D

The links you gave to set the password did not bring up anything so I'll research this some more. I think for now I'll just not have a password.

Sorry it took so long for me to reply. I got sidetracked on other things for several days.
czimmer
 
Posts: 2
Joined: 11. December 2009 17:53


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 73 guests