View Single Post
Old 01-13-2008, 11:43 AM   #1 (permalink)
Cars-blog
Contributing Member
 
Join Date: 12-16-07
Posts: 407
iTrader: 0 / 0%
Cars-blog is on the right pathCars-blog is on the right pathCars-blog is on the right path
How do you connect WordPress to a remote database?

Does anyone know how to connect a WordPress installation to a remote MySQL database? My host uses a separate database server so the code

define('DB_HOST', 'localhost');

in the wp-config.php file doesn't work. I've tried putting the url in place of 'localhost' as well as the IP address as in

define('DB_HOST', 'http://db.domain.com:port');

and

define('DB_HOST', 'http://xxx.xxx.xxx.xxx:port');

where xxx.xxx.xxx.xxx is the IP address.

Both give me a Error connection to database message.

Usingthe IP address without 'http://' as in

define('DB_HOST', 'xxx.xxx.xxx.xxx:port');

gives me a CGI Error - The specified CGI application misbehaved by not returning a complete set of HTTP headers.

Any hep will be greatly appreciated?
__________________
Want more power for your car? Then visit Modified Cars for car mods and guides.
The Home Garden site.
Cars-blog is offline   Reply With Quote