View Single Post
Old 01-13-2008, 11:43 AM   #1 (permalink)
Cars-blog
Contributing Member
 
Join Date: 12-16-07
Posts: 85
iTrader: 0 / 0%
Cars-blog is liked by many
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?
__________________
Visit my Modified Cars and Home Garden sites.
Cars-blog is offline   Reply With Quote
Sponsored Links
SEO Hosting by HostGator  Advertise Here  Buy Blog Links