Access is always denied
Posted by: Jonathan (---.phil.east.verizon.net)
Date: August 17, 2006 09:08AM

Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'root'@'localhost' (using password: YES) in C:\wamp\www\database.php on line 3

This is the error message I always get when I try to use:

<?php

mysql_connect ('localhost','root','Noneofyourbusiness');

?>

I've gone into the account priviliges and given it full rights to all the listed databases, so I don't know what's wrong. Any advice is greatly appreciated. Thanks.

Options: ReplyQuote
Re: Access is always denied
Posted by: CyberSpatium (67.170.181.---)
Date: August 17, 2006 10:06AM

the default mysql root user does not have any password set, use:

mysql_connect ('localhost', 'root', null);

Options: ReplyQuote
Re: Access is always denied
Posted by: yfastud (72.236.169.---)
Date: August 17, 2006 02:56PM

Or setup your password follows my second post from here:

[forum.wampserver.com]

Hope this help

Options: ReplyQuote
Re: Access is always denied
Posted by: Jonathan (---.phil.east.verizon.net)
Date: August 17, 2006 09:59PM

Yes I already changed the password (as I said in the post, noneofyourbusiness). It's a different PW than that and I've follwoed all the steps. I'm able to log on to phpmyadmin with the account root and the password. But I can't connect, access is always denied.

Options: ReplyQuote
Re: Access is always denied
Posted by: CyberSpatium (67.170.181.---)
Date: August 18, 2006 08:48AM

you have not setup access permissions correctly. use OLD_PASSWORDS
[dev.mysql.com]

Options: ReplyQuote


Sorry, only registered users may post in this forum.