> James Keeline <[EMAIL PROTECTED]> wrote:
>   --- java4ll_cs <[EMAIL PROTECTED]> wrote:
> 
> > i have two servers,database server and web server, both are appach 
> > server i try to connet to db by php
> > 
> > <?
> > 
> > $db=mysql_connect("db server ip");
> 
> As seen on http://us2.php.net/mysql_connect the mysql_connect() function 
> typically also has a
> MySQL user name and corresponding password.  If no user name is specified, 
> the assumed user name
> is the same as the webserver user ("apache" or "nobody" are two common 
> examples).

--- afaf mousa <[EMAIL PROTECTED]> wrote:

>     thank u
>    but what this error mean? 
>    " can't connect to mysql server on host ' db server ip' :10066"
>     -- when i put my db on web server ..using '127.0.0.1'....it work


The information is on the page I cited.  The mysql_connect() function normally 
takes three
arguments.  The first is the location of the database server.  If it is on the 
same machine as the
webserver, the appropriate value is "localhost" or "127.0.0.1".  The value the 
error is
complaining about is some string which cannot be interpreted by the system " db 
server ip".

I'm sure that you are doing your best but I am having some difficulty reading 
some of your
English.  You seem to state that when you use the value 127.0.0.1 that it 
works.  If that is the
case, why are you trying another value, especially something like " db server 
ip"?

The second argument for mysql_connect() is the MySQL username and the third 
argument is the
password which corresponds with the username.

James


Community email addresses:
  Post message: [email protected]
  Subscribe:    [EMAIL PROTECTED]
  Unsubscribe:  [EMAIL PROTECTED]
  List owner:   [EMAIL PROTECTED]

Shortcut URL to this page:
  http://groups.yahoo.com/group/php-list 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/php-list/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to