[PHP] mysql_pconnect to remote system

2001-10-23 Thread Nick Richardson

Ok, after all the problems trying to get into the flat file and stuff, i
decided it will just be easier to use mysql... Only problem is the database
is on the machine that is going to host the site when it's done... (Redhat
Linux) and is being developed in my office on a windows box...

So i need to connect to the database from my win box - and it's giving
connection failed messages.

This is what i'm doing:

?php
$server = IP of server:3306;
$user = username;
$pass = password;

if(!($myLink = mysql_pconnect($server,$user,$pass))) {
print(Unable to connect to databasebr\n);
exit();
}

?

and every time it gives me the error. - do i need to change the script? or
do i need to contact the ISP that's hosting the database?

//Nick Richardson
[EMAIL PROTECTED]


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] mysql_pconnect to remote system

2001-10-23 Thread Andrey Hristov

The setting of the your user in Mysql is maybe to connecto only from 
localhost (their machine) if you want to connect from anywhere else you 
receive an error. Maybe this is your case. Decide : 
1)post your error message here for better solution (use mysql_error)
or
2)contact your ISP if your think that the written above is the problem.

-- 
Andrey Hristov
Web Developer
Icygen Corporation
BUILDING SOLUTIONS
http://www.icygen.com

On Tuesday 23 October 2001 03:29 am, you wrote:
 Ok, after all the problems trying to get into the flat file and stuff, i
 decided it will just be easier to use mysql... Only problem is the database
 is on the machine that is going to host the site when it's done... (Redhat
 Linux) and is being developed in my office on a windows box...

 So i need to connect to the database from my win box - and it's giving
 connection failed messages.

 This is what i'm doing:

 ?php
 $server = IP of server:3306;
 $user = username;
 $pass = password;

 if(!($myLink = mysql_pconnect($server,$user,$pass))) {
   print(Unable to connect to databasebr\n);
   exit();
 }

 ?

 and every time it gives me the error. - do i need to change the script? or
 do i need to contact the ISP that's hosting the database?

 //Nick Richardson
 [EMAIL PROTECTED]


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]