Can't connect to local MySQL server

hello everyone, i am new to ROR.

i am just trying to run a simple application which will show some data
from database, i have done it in my local machine. But when i tried to
do the same thing in my “Dreamhost” shared hosting. I got an error.

i used the Rake tool and successfully migrated a model (using SSH
client tool). The table was successfully created hosting db server, so
i thought there will be no problem in getting the database server. But
when i call the page this error comes:

Can’t connect to local MySQL server through socket ‘/var/run/mysqld/
mysqld.sock’ (2)

i checked that database.yml file is porperly configured, and i think
if it wasn’t configured properly then how the table get created…

so what can be the problem , can anyone help?

thanks in advance.

wierd - have you checked that mysql is running? i agree that if the
table
was created then surely the sock you specified must be correct? I have
seen
that error when mysql isn’t running. Im not really very clued up on this
but
that’s my 2cents worth :slight_smile:

ivor

Just checking the obvious - are you definately running in production
mode?

I use site5 rather than dreamhost however I have to set the following in
/config/environment.rb:

ENV[‘RAILS_ENV’] ||= ‘production’

Luke

thanks for your reply, my problem is solved. i have done everything
properly
as the hosting service suggested. returning from the office i checked
back
the website, and it responded as it should. so may be there was some
problem
in the hosting.