Access denied for user 'root'@'localhost'

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

Access denied for user 'root'@'localhost'

Postby bbgd » 29. March 2012 13:26

Hello,

I saw that this topic was already discussed and I tried all the methods described but without success.

Here is my problem:
I am try to config a sv XAMPP 1.7.3. I defined my root pass also other users. No problem. I tested, it works also in shell.
Now, when I type localhost, it loads perfectly as long as it is the xampp defaut. If I am trying to upload my site with mysql DB, it says: Access denied for user 'root'@'localhost' (using password: NO)....
I tried all the methods, modifying the config.php in my adminphp no result.

I must say that if I delete the root pass (leave it blank), my website (localhost/mysite/) loads perfectly.... what is the cause??? Anyone knows?... it is urgent.

Thank you!
bbgd
 
Posts: 4
Joined: 29. March 2012 13:21
Operating System: win 7

Re: Access denied for user 'root'@'localhost'

Postby hackattack142 » 29. March 2012 22:21

You need to be a little more clear.

You are getting this while trying to log into phpMyAdmin or via another method?

How are you setting the password?

How are you importing this database?

What is the value of $cfg['Servers'][$i]['auth_type'] in /xampp/phpmyadmin/config.inc.php?
XAMPP Control Panel Developer
Latest CP: viewtopic.php?f=16&t=48932
hackattack142
 
Posts: 701
Joined: 20. May 2011 23:29
Operating System: Windows 7 Ultimate SP1 64-Bit

Re: Access denied for user 'root'@'localhost'

Postby bbgd » 30. March 2012 06:18

No, I am getting this error while I am trying to access my php program on localhost. In phpmyadmin I am entering without problems with the root and it's password.
The password was set from the phpmyadmin interface.
The database is imported and it's working perfectly when I put no password for root. But when I define the password... BANG .. error... trying from my IE to access 127.0.0.1/mysite/..........

$cfg['Servers'][$i]['auth_type'] in /xampp/phpmyadmin/config.inc.php the value is cookie. I also tried the other var, but without success as long as root has a password.

Thank you for your help!
bbgd
 
Posts: 4
Joined: 29. March 2012 13:21
Operating System: win 7

Re: Access denied for user 'root'@'localhost'

Postby Sharley » 30. March 2012 06:42

Did you you set or change the root user password using
http://localhost/security/xamppsecurity.php

You can access the full Security page from here:
http://localhost/security

With Apache and MySQL running you can click on the above links to get there.
User avatar
Sharley
AF Moderator
 
Posts: 3316
Joined: 03. October 2008 05:10
Location: Yeppoon, Australia Time Zone: GMT/UTC+10
Operating System: Win 7 Pro 32bit/XP Pro SP3

Re: Access denied for user 'root'@'localhost'

Postby bbgd » 30. March 2012 09:31

Yes, I also tried this method, but when I'm trying to access the localhost after the pass is defined, I get the denied error.
Much simple, when I put a pass for the root, I can't access the php prg. If I delete the pass, everything works perfectly....why??
bbgd
 
Posts: 4
Joined: 29. March 2012 13:21
Operating System: win 7

Re: Access denied for user 'root'@'localhost'

Postby hackattack142 » 30. March 2012 23:52

From what you described, it is the authentication in the website you made/acquired that is failing. If you change the database for the SQL server, you need to adjust your website to use the new password. Also, it is generally not a good idea to use the root user as a general purpose account or for website interactions. It would be better to create a user that can only access the databases it needs and only has the permissions that it needs.
XAMPP Control Panel Developer
Latest CP: viewtopic.php?f=16&t=48932
hackattack142
 
Posts: 701
Joined: 20. May 2011 23:29
Operating System: Windows 7 Ultimate SP1 64-Bit

Re: Access denied for user 'root'@'localhost'

Postby bbgd » 02. April 2012 10:26

Thanks for your answers.
bbgd
 
Posts: 4
Joined: 29. March 2012 13:21
Operating System: win 7

Re: Access denied for user 'root'@'localhost'

Postby calicali88 » 10. April 2012 21:00

Thanks Sharley, you solved my problem.
calicali88
 
Posts: 1
Joined: 10. April 2012 20:58
Operating System: Windows 7 Ultimate


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 110 guests