You are here: Re: mysql_connect problem ... « PHP Programming Language « IT news, forums, messages
Re: mysql_connect problem ...

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]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация