Issue with password in MySQL

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

Issue with password in MySQL

Postby lologirl » 21. August 2009 00:54

Ok, so back in March, I installed MySQL successfully, it was all working properly, it was all thanks to this Forum, and one lovely Australian user who had great patience with me and explained everything wonderfully.

So now I'm back for more help. I have been working on this all day and can't figure it out. My issue is that I have the MySQL password written down that I used. When I enter the password, I get the following;
Code: Select all
mysqladmin -u root -p status
Enter password: ******
mysqladmin: connect to server at 'localhost' failed
error: 'Access denied for user 'root'@'localhost' (using password: YES)'

First of all, does this mean that my password is not being accepted - i.e. - incorrect?

If so, then how can I reset the password, I can't figure it out and, as I say, I've been spending hours on this one issue at this stage.
Thanks in advance for any help or advice.
lologirl
 
Posts: 14
Joined: 06. February 2009 05:54
Location: Ireland

Re: Issue with password in MySQL

Postby Izzy » 21. August 2009 02:48

Thanks for the kind words and welcome back.

First make sure that you have started MySQL and it is showing green running in the XCP then try your command again.

If it still fails then you may need to reset the password by running C:\mysql\resetroot.bat file then if you wish and for security, create a new password for root using the Security link in http://localhost.

Then try your command again after once again checking that MySQL is running.

Good luck.
Izzy
 
Posts: 3344
Joined: 25. April 2006 17:06

Re: Issue with password in MySQL

Postby aj123cd » 21. August 2009 08:16

hi
If you can, try it the following method. Pl let me know.
in phpmyadmin floder -> Open config.inc.php with a text editor.

fine line
$cfg['Servers'][$i]['password'] = 'YOUR PASSWORD';

WRITE IT DOWN U PASSWORD OR USER.
LET ME KNOW ISIT HELPFUL

* User for advanced features */

$cfg['Servers'][$i]['user'] = 'root';
$cfg['Servers'][$i]['password'] = 'YOUR PASSWORD";

$cfg['Servers'][$i]['controluser'] = 'root';

$cfg['Servers'][$i]['controlpass'] = 'root';


/* Advanced phpMyAdmin features */


ref:http://community.apachefriends.org/f/viewtopic.php?f=16&t=36479
aj123cd
 
Posts: 62
Joined: 03. June 2009 08:19
Location: London,UK

Re: Issue with password in MySQL

Postby lologirl » 21. August 2009 11:36

Izzy wrote:If it still fails then you may need to reset the password by running C:\mysql\resetroot.bat file then if you wish and for security, create a new password for root using the Security link in http://localhost.
Hi Izzy, I had already tried this as I found an old post of your advising the same, and it didn't work.
aj123cd wrote:If you can, try it the following method.
Thanks Aj123cd, I tried this - it isn't working, I am still getting the same error message. Can I ask you what changing cma to root does?

I had all this working fine before, I can't figure out what is going wrong.
lologirl
 
Posts: 14
Joined: 06. February 2009 05:54
Location: Ireland

Re: Issue with password in MySQL

Postby Izzy » 21. August 2009 12:03

What didn't work with the bat file - it didn't reset the password or it reset the password and the new password you created didn't help with your issue?

What version of XAMPP?

If I recall correctly you are using 1.7.0 which had a buggy resetroot.bat file.

Download this zipped patch from the XAMPP SourceForge Archive and extract the files to their respective folders including the resetroot.bat file and overwrite when asked.

Now try deleting your old password by running the bug fixed bat file.

You can then create your new root password using the method I pointed out above and then try your command again - with the new password it should work as I could replicate your error message quite easily.
Izzy
 
Posts: 3344
Joined: 25. April 2006 17:06

Re: Issue with password in MySQL

Postby lologirl » 22. August 2009 17:21

Hey Izzy, thanks for this - I will try this tomorrow and post back to let you know, I don't have the time to do it right now.
lologirl
 
Posts: 14
Joined: 06. February 2009 05:54
Location: Ireland

Re: Issue with password in MySQL

Postby lologirl » 26. August 2009 12:50

Hi Izzy - your solution worked. :D Thanks a million for your help and sorry for talking so long to get back to you to let you know.

I have what is maybe a stupid question but I can't really understand this.
When I log in to MySQL using the password at the command prompt from the 'bin' directory like this:
mysql -h hostname -u username -p - I can log in successfully, and SHOW DATABASES shows information_schema and test and a list of other databases that I have created.
However from the same 'bin' directory, if I simply type mysql, then it looks like I am in MySQL SHOW DATABASES now shows simply information_schema and test, which were the databases already created when I installed MySQL. I just can't understand how I can get to these two databases without the password - is this standard, and why aren't they protected by the password?
lologirl
 
Posts: 14
Joined: 06. February 2009 05:54
Location: Ireland

Re: Issue with password in MySQL

Postby Wiedmann » 26. August 2009 13:08

I just can't understand how I can get to these two databases without the password -

Because you have an older XAMPP, which have an anonymous MySQL user. And this user have all privileges to the "test" db.

Regarding the "information_schema": Each user which can login, have access to this.
Wiedmann
AF Moderator
 
Posts: 17102
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 117 guests