View Full Version : remote connection help!

01-05-2006, 04:05 PM
hi, does anybody know how to connect php app to remote servers?
Ive tried to connect wp to an external database but i dont know how, well... i completed all the connection information as you see below:

define('DB_NAME', ''); // The name of the database
define('DB_USER', ''); // Your MySQL username
define('DB_PASSWORD', ''); // ...and password
define('DB_HOST', ''); // 99% chance you won't need to change this value

but in db_host I wrote the host only because I dont know the port.

Thanks for helping

Ps I allowed the server in cpanel to grant host access!
The connection is from WIN2003 to unix

01-05-2006, 04:45 PM
You would use the domain name.
Have you checked that the host/server allows remote connections?

01-05-2006, 04:57 PM
thanks degsy but how can i do it?

01-06-2006, 02:29 PM
Ask the server admin if they allow remote connections

01-06-2006, 04:56 PM
i also did this once, and all i had to do is insert into DB_HOST 'sitename.extension'

01-06-2006, 05:40 PM
My WP database is set to a different hosting. This is what I did -

define('DB_HOST', 'db189.oneandone.co.uk');

I can't remember where I got the host name from (using 1and1), but check out your hosting settings and I'm sure it'll say there what to put.

01-06-2006, 07:15 PM
define('DB_HOST', '');

3306 is the default mysql port but check your phpinfo() output to be sure
if you are unsure of the ip (you can just use the hostname of course) then ping it run >> cmd >> ping hostname