#1045 - Access denied for user 'root'@'localhost'

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
senthil babu
Forum Newbie
Posts: 14
Joined: Tue Jan 27, 2009 12:20 am
Location: INDIA

#1045 - Access denied for user 'root'@'localhost'

Post by senthil babu »

Hi..

when i download wamp server, it shows this error for mysql
"#1045 - Access denied for user 'root'@'localhost' (using password: NO)"
how can i solve this.. say clearly

see u again
:)
User avatar
susrisha
Forum Contributor
Posts: 439
Joined: Thu Aug 07, 2008 11:43 pm
Location: Hyderabad India

Re: #1045 - Access denied for user 'root'@'localhost'

Post by susrisha »

that means the password that it got is wrong
User avatar
requinix
Spammer :|
Posts: 6617
Joined: Wed Oct 15, 2008 2:35 am
Location: WA, USA

Re: #1045 - Access denied for user 'root'@'localhost'

Post by requinix »

susrisha wrote:that means the password that it got is wrong
Or that the password it didn't get is wrong.
(using password: NO)
Provide a password.
BomBas
Forum Commoner
Posts: 41
Joined: Wed Mar 04, 2009 1:04 pm

Re: #1045 - Access denied for user 'root'@'localhost'

Post by BomBas »

Of course it didn't get a password, WAMP isn't using a password.
Last edited by BomBas on Sat Mar 07, 2009 2:41 am, edited 1 time in total.
User avatar
requinix
Spammer :|
Posts: 6617
Joined: Wed Oct 15, 2008 2:35 am
Location: WA, USA

Re: #1045 - Access denied for user 'root'@'localhost'

Post by requinix »

BomBas wrote:Of course it didn't get a password, WAMP isn't using password.
Then any ideas why root, a user which certainly does exist, can't log on without a password?
BomBas
Forum Commoner
Posts: 41
Joined: Wed Mar 04, 2009 1:04 pm

Re: #1045 - Access denied for user 'root'@'localhost'

Post by BomBas »

Try to login into PHPMYADMIN without a password.

Does it work?
User avatar
senthil babu
Forum Newbie
Posts: 14
Joined: Tue Jan 27, 2009 12:20 am
Location: INDIA

Re: #1045 - Access denied for user 'root'@'localhost'

Post by senthil babu »

i have used PHP my admin with out a user name and password before...

like

Code: Select all

<?php
mysql_connect("localhost","","");
mysql_select_db("db name");
?>
But now i dont know why it shows the error
#1045 - Access denied for user 'root'@'localhost' (NO password)
i think i did some installation mistake..
where is the mistake occours
Post Reply