|
Posted by David Haynes on 06/18/06 10:38
dude wrote:
> this is the code:
>
> $user = "user";
> $pass = "";
> $connect = mysql_connect('localhost',$user,$pass);
> or die('could not connect: '. mysql_error());
>
> mysql_close($connect);
>
> i'm a beginer, and i just want to see if i could connect to server.
> on pypmyadmin i set the following for the user@localhost:
>
> password: No
> global privileges: all privileges
> grant: yes ...
>
> and ofcourse i get the warning: mysql_connect()function.mysql-connect]:
> Access denied for user 'user'@'localhost' error on the connect string line.
>
> it has everything, and why doesnt connect string he let me in.
> please help ...
If you use 'localhost' mysql will often try to connect via a named-pipe
which involves having the named pipe set up and the permissions correct.
If you use 127.0.0.1 (i.e. the TCP/IP loopback to localhost) mysql will
use the TCP/IP stack instead.
Since 127.0.0.1 is well known to the TCP/IP driver, it is all resolved
in memory so there is no real performance penalty using it vis-a-vis
named pipes.
-david-
Navigation:
[Reply to this message]
|