I would hazard a guess that you haven't granted phil the right permissions.
mysql -- user=root mysql
GRANT ALL PRIVEILEGES ON *.* TO userlocalhost IDENTIFIED BY 'password' WITH
I would also guess that root (which is the default) doesn't have a password
set up which is why that works.
"Phil W" <meprivacy.net> wrote in message
news:bj9qct$gth67$1ID-180242.news.uni-berlin.de...running> Hi, I'm a bit of a newbie to PHP and mySQL. I'm trying to get thingsthe> on my W2K machine.
> I'm having a problem using the mysql_connect() function (although the
> problem's probably rooted in mysql). When trying to log in via PHP withblank.> code "$link = mysql_connect("localhost", "phil", "pwpass123");" I get the
> Warning: mysql_connect() [function.mysql-connect]: Access denied for user:
> 'phillocalhost' (Using password: YES) in c:\inetpub\wwwroot\php\mysql.php
> on line 9
> The thing is that it connects ok if I leave the username and passwordran> The ones I'm using above are ones I specified in mysqladmin when I first> it.
> Can anyone help me 1) Stop mysql accepting blank username and password
> values, and 2) get it to accept my defined username and password?
> Many thanks in advance,