Error with database connectivity

Hi,

I’m new user to ruby on rails. I followed one tutorial but it is giving
error while database connectivity. The error is:

No connection could be made because the target machine actively refused
it. - connect(2)

my database.yml file is as follows. I’m trying to access MySql remotely.

development:
adapter: mysql
database: cookbook
username: poonam
password:poonam
host: web

test:
adapter: mysql
database: cookbook
username: poonam
password:poonam
host: web

production:
adapter: mysql
database: cookbook
username: poonam
password: poonam
host:web


I done like u said. But no luck. The error is same.

have you set your hosts file? I’m asking this because you need a name
resolution for you host, since you’re using host: web. Instead you can
try
using host: ip.

On 8/28/06, poonam [email protected] wrote:

it. - connect(2)

my database.yml file is as follows. I’m trying to access MySql remotely.

development:
adapter: mysql
database: cookbook
username: poonam
password:poonam

host: web <---- HERE

test:

password: poonam
host:web <---- HERE


Posted via http://www.ruby-forum.com/.


WINDOWS: “Where do you want to go today?”
LINUX: “Where do you want to go tomorrow?”
BSD: “Are you guys coming or what?”

Filipe Rocha wrote:

Strange…
What OS are you running?

Windows server 2003

Strange…
What OS are you running?

Filipe Rocha wrote:

Maybe the firewall is blocking connections to database system (which
one?) . maybe you missspelled your IP on database.yml. Did you install
the ruby connector to the database?
These are all the things I can remember.
I would approach it by:

  1. confirm that the database is running
  2. confirm that the firewall is not blocking connections
  3. double check the database IP @ database.yml .
  4. check if I had the database connector if not install it from the
    gems.

From where I get that database connector?

Maybe the firewall is blocking connections to database system (which
one?) . maybe you missspelled your IP on database.yml. Did you install
the ruby connector to the database?
These are all the things I can remember.
I would approach it by:

  1. confirm that the database is running
  2. confirm that the firewall is not blocking connections
  3. double check the database IP @ database.yml .
  4. check if I had the database connector if not install it from the
    gems.
  5. try again

This would be my umble approach. :slight_smile:


WINDOWS: “Where do you want to go today?”
LINUX: “Where do you want to go tomorrow?”
BSD: “Are you guys coming or what?”

poonam wrote:

Filipe Rocha wrote:

Maybe the firewall is blocking connections to database system (which
one?) . maybe you missspelled your IP on database.yml. Did you install
the ruby connector to the database?
These are all the things I can remember.
I would approach it by:

  1. confirm that the database is running
  2. confirm that the firewall is not blocking connections
  3. double check the database IP @ database.yml .
  4. check if I had the database connector if not install it from the
    gems.

From where I get that database connector?
I’m using MySql database.

Hi,

you need a accurate Ip or hostname.

what is “host: web” ???

poonam schrieb:

poonam wrote:

  1. confirm that the firewall is not blocking connections

If you’re just starting out with Rails and you’re on Windows, consider
using InstantRails (just google it) to help you get started!
Cheers
Mohit.

Alexander Klaiber wrote:

Hi,

you need a accurate Ip or hostname.

what is “host: web” ???

“host:web” here web is hostname.

Mohit S. wrote:

poonam wrote:

  1. confirm that the firewall is not blocking connections

If you’re just starting out with Rails and you’re on Windows, consider
using InstantRails (just google it) to help you get started!
Cheers
Mohit.

I tried the InstantRails now it is giving error:

#28000Access denied for user ‘poonam’@‘DEV-116’ (using password: NO)

On 8/29/06, poonam [email protected] wrote:

I tried the InstantRails now it is giving error:

#28000Access denied for user ‘poonam’@‘DEV-116’ (using password: NO)
try
username: root
password:


Posted via http://www.ruby-forum.com/.


WINDOWS: “Where do you want to go today?”
LINUX: “Where do you want to go tomorrow?”
BSD: “Are you guys coming or what?”

poonam wrote:

Mohit S. wrote:

poonam wrote:

  1. confirm that the firewall is not blocking connections

If you’re just starting out with Rails and you’re on Windows, consider
using InstantRails (just google it) to help you get started!
Cheers
Mohit.

yes…that InstantRails is working…

Thanks.
poonam