error with database connectivity

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.

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 <---- HERE

Strange…
What OS are you running?

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:

poonam wrote:

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.

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.

Mohit Sindhwani wrote:
> poonam wrote:
>>>> 2. 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)

try
  username: root
  password: