# locked out of xampp and MySQL



## tmjhayward

Hi everyone. I just created a database and tables in MySQL so I can collect the data from an online survey I'm creating. I was in xampp and clicked on Security. It listed several things that weren't secure. I don't remember if the link was in xampp or what, but I followed some directions and set the passwords recommended, for both myself as a user, as well as root. Now when I try to log back in to localhost (xammpp or security or anything) I get this error with or without a password:

_The server localhost at xampp user requires a username and password.
Warning: This server is requesting that your username and password be sent in an insecure manner (basic authentication without a secure connection)._

How can I reset the passwords? I don't want to have to uninstall and reinstall because I'll lose my database. I've searched the forums and tried a few different things, but I'm either doing them wrong or they just don't work. I'm running Windows Vista (which can be frustrating enough by itself) if that makes a difference.

If anyone can help me, I'd really appreciate it! Thanks! MJ


----------



## tmjhayward

I'm still hoping someone can help me. I've researched on this site, on Apache's site and everywhere else, and I've tried many suggestions, but nothing works. When I go to http://localhost/xampp/ and click on phpMyAdmin, I get a login screen. Since I had changed the passwords as suggested in the Security site, I tried with the passwords and without, for both root and my own user name. I still get this error:

Error #1045 - Access denied for user 'root'@'localhost' (using password: NO) (or YES if I use a password).

The only way I know to access MySQL is thru phyMyAdmin. Is my only alternative to uninstall and reinstall? I could really use some advice! Thanks!


----------



## tmjhayward

I was finally able to get this fixed. I went to http://dev.mysql.com/doc/refman/5.0/en/resetting-permissions.html (for Windows). I had tried this same thing several times, but it never worked. If anyone else has this problem, this is how I made it work:

For step 3, I had been trying to save the file in C:\mysql, and calling it init.txt. I finally just called the txt file *mysql-init.txt*, and saved it directly in the C: directory. Then for step 5, when I ran this command, *C:\> C:\mysql\bin\mysqld-nt --init-file=C:\mysql-init.txt*, at the DOS prompt, it never came back with a response. It seemed like it was just looping or something. This is why I thought it never worked. The last time I tried it, I got frustrated and just exited the DOS prompt. Then I restarted MySQL and Apache thru the Xampp control panel, went to http://localhost/xampp/ and was able to log into root with the password I had reset. I just hope it lets me in next time - I'm afraid to log out now!


----------



## Sequal7

You can reset the MySQL password easily;
http://dev.mysql.com/doc/refman/5.0/en/resetting-permissions.html#resetting-permissions-windows

You can delete the security for xampp by deleting the xampp.users and .htaccess files that were created;
(C:\xampp\security\xampp.users C:\xampp\htdocs\xampp\.htaccess)


----------

