Failed db::connect from remote host

Failed db::connect from remote host

Posted by: chassy
Posted on: 2005-10-23 23:44:00

I'm having problems connecting to a mysql database from a remote host. I'm working on switching site from Verio to DreamHost. To make a smooth transition, I've recreated the database on DreamHost, and am trying to connect to it from the Verio servers, but keep getting "DB Error: connect failed"

Here's the connect code (not showing the real username & password, of course):

$db = DB::connect("mysql://username:password@mysql.mariska.dreamhosters.com/mariska");

I've made sure that connections are allowed from the Verio servers. I've also verified that I can make the connection from my home machine (using CocoaMySQL).

Any thoughts? Info and advice would be greatly appreciated!

Re: Failed db::connect from remote host

Posted by: decswxaqz
Posted on: 2005-10-24 00:58:00

I've never used mysql connection string before, but I think the database host is wrong. It should be pointing to your db host instead of DH's. So it should be db_host.your_domain.com.
And the IP/domain name that you are have entered for each user is correct?

Re: Failed db::connect from remote host

Posted by: netdcon
Posted on: 2005-10-24 04:39:00

You can, in the settings for the database user that you're using to access the database, TEMPORARILY set a location in the "From what hosts (computers) may netdadmin connect to the 'yourdatabasename' database?" to be just a % (which allows connect from ANY host). If you know the DNS-resolved name of your current machine at Verio, use that hostname instead to keep the new DB secure. If not, use the "catch-all" (plain %) wildcard and remove it ASAP.

Re: Failed db::connect from remote host

Posted by: matttail
Posted on: 2005-10-24 08:30:00

just a side note, thoes settings are in the Panel > Goodies > Mysql > then click edit across from the database in question.



-Matttail

Re: Failed db::connect from remote host

Posted by: chassy
Posted on: 2005-10-24 10:20:00

Yep, I tried opening up the connection to %, but that didn't help.

Re: Failed db::connect from remote host

Posted by: chassy
Posted on: 2005-10-24 10:22:00

The DB is hosted on a temporary dreamhosters.com subdomain, while the dns for the real domain is being processed. I can successfully connect from my home machine, so I know that part works.

Tags: db errordreamhostremote hostmysql databaseverioservers