MySQL passwords mistake

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

MySQL passwords mistake

Postby Roboticmayhem » 18. March 2009 06:37

Hi,

I'm new to web servers, php, MySQL, and all this stuff in general so please explain this to me like I'm 6 years old. :?

I was in the process of moving my Joomla install from localhost to a remote host and was about to make a copy of its database to put on the server, when I noticed that at the bottom of phpMyAdmin it suggested that the root user be given a password because it was a security hole. So went over to the permissions tab and proceed to add a password to the root user. However, now nothing can access the MySQL databases including phpMyAdmin, the only way I know of changing the password back. Is there and easy way to fix this? It seems like a simple problem, but being so new, I don't really know how it works and am unsure of how to proceed. Is this a serious enough problem that the database will be lost? How much would I lose?

Thanks!
-Nick
Roboticmayhem
 
Posts: 5
Joined: 18. March 2009 06:25

Re: MySQL passwords mistake

Postby Izzy » 18. March 2009 06:54

Roboticmayhem wrote:so please explain this to me like I'm 6 years old.
Now, please sit still and pay attention or no more treats until you do. :D


Always give what version of Windows and what version of XAMPP we are dealing with please or I will have to put you in a corner all on your own until you remember what to do in these forums. :D


Now back to reality.

I am assuming Windows XP and XAMPP 1.7.0 with patch2.


Go to xampp\mysql\ folder and double click on resetroot.bat and see if that helps.


You set the root password for MySQL/phpMyAdmin in the http://localhost/security page by following the link on that page.


BTW you shouldn't loose your Joomla database as it is stored under the name you gave it in a folder of the same name in xampp\mysql\data\ folder.
Izzy
 
Posts: 3344
Joined: 25. April 2006 17:06

Re: MySQL passwords mistake

Postby Roboticmayhem » 18. March 2009 06:58

*pout* Yes sir.

--> reality -->

Thanks for the help! I'll report back on if its been solved or not...
-Nick
Roboticmayhem
 
Posts: 5
Joined: 18. March 2009 06:25

Re: MySQL passwords mistake

Postby Roboticmayhem » 18. March 2009 07:17

Okay, so I tried both the things you mentioned, starting with the resetroot.bat. It didn't do anything to change the error message I am getting:

Error
________________________________

MySQL said:

Cannot connect: invalid settings.
________________________________
phpMyAdmin tried to connect to the MySQL server, and the server rejected the connection. You should check the host, username and password in your configuration and make sure that they correspond to the information given by the administrator of the MySQL server.


I then tried to go into the security site like you said and got the folloing error:

Access forbidden!

You don't have permission to access the requested object. It is either read-protected or not readable by the server.

If you think this is a server error, please contact the webmaster.

Error 403

127.0.0.1
03/17/09 23:14:03
Apache/2.2.11 (Win32) DAV/2 mod_ssl/2.2.11 OpenSSL/0.9.8i mod_autoindex_color PHP/5.2.8


I'm not sure which root the "resetroot.bat" is reseting or if there are multiple roots, but whatever it did didn't affect the behavior visibly. Any other suggestions? (and yes, I am using XAMPP 1.7.0 but I'm not sure about the security pack. I downloaded it about 3 days ago, so I would assume its the latest version, or very close...)

Thanks!
-Nick
Roboticmayhem
 
Posts: 5
Joined: 18. March 2009 06:25

Re: MySQL passwords mistake

Postby Izzy » 18. March 2009 07:26

Go to the same place you downloaded XAMPP from and download and install the Patch2 which has an improved resetroot.bat file - then run the new bat file again and try this time with MySQL stopped.

Your access forbidden error may stem from another issue and this topic may have the answer.
viewtopic.php?p=138560#p138560
Izzy
 
Posts: 3344
Joined: 25. April 2006 17:06

Re: MySQL passwords mistake

Postby Roboticmayhem » 18. March 2009 07:56

Wow. Just wow. I feel like such and idiot. :D I don't know why it didn't occur to me before:

I downloaded patch 2, installed it, and ran reset root. It changed the error, but it still didn't work. I'm not sure which one changed it, if it was the patch or the new resetroot, but it doesn't really matter at this point. After that didn't work, I decided to look into fixing the security page, and guess what? As I opened the XAMPP control panel to restart appache, guess what service had stopped running? MySQL. For all the other people like me: if you want something to work, it should be running. :D I know, astounding...

Anyway, thanks for the help Izzy, its working again, and I've found another thread where you've shown someone how to make a password for the root user the correct way. :D Out of curiosity, do you live on here?

Thanks!
-Nick
Roboticmayhem
 
Posts: 5
Joined: 18. March 2009 06:25

Re: MySQL passwords mistake

Postby Izzy » 18. March 2009 08:34

The resetroot.bat file stops MySQL and when it is finished doing the deed it asks you to restart the MySQL server.


The security fix would have allowed you access to phpMyAdmin after the root password was reset (removed).


So nothing magic and you did not forget to start MySQL in the first place.


BTW don't use the root user/pass as a database user or you will incur many security issues.

Use a separate user/pass for each database you create.


Good luck and yes someone has to be here most of the time to baby sit you six year olds. :D
Izzy
 
Posts: 3344
Joined: 25. April 2006 17:06

Re: MySQL passwords mistake

Postby Roboticmayhem » 18. March 2009 09:44

Great, I'll try and take what you've said to heart. Its kind of a "fire hose" of information though, and it'll take me a while to feel comfortable with it.

Thanks for your advice, but for now, this six year old is past his bed time... :D
-Nick
Roboticmayhem
 
Posts: 5
Joined: 18. March 2009 06:25

Re: MySQL passwords mistake

Postby MsJac » 23. March 2009 10:00

Thanx for the great suggestions and support Izzy.
This thread helped me immensely :)

Jacquii.
Image

JacquiiDesigns.com • One of a Kind
Poetry in Color Forum • Celebrating Diversity With The Typed Word
User avatar
MsJac
 
Posts: 1
Joined: 23. March 2009 06:33
Location: Tennessee, USA


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 113 guests