Quantcast
Channel: WordPress › Support » Forum: Hacks - Recent Topics
Viewing all articles
Browse latest Browse all 8245

TLis on "Can't Connect to Second MySQL DB"

$
0
0

I need to connect to a second database.

The following works fine on my local installation:
$newdb= new wpdb("DBUserName","Password","DatabaseName","HostName");

That immediately connects me with my non-WordPress database.

I'm not getting a connection using this code on the live site though, even though I've changed all the variables to correspond to the webhost's parameters (and I've checked against the wp-config file, too -- I'm using the same hostname that shows in the config file, so I know I've got that right).

WordPress isn't giving me anything to go on: the only error message I can get it to display has no actual message (as shown below):

WordPress database error: []

I haven't included a sitelink, since this is for a secured intranet (and I can't leave the non-functioning page visible to access for the users anyway until I can resolve this problem).


Viewing all articles
Browse latest Browse all 8245

Trending Articles