Rails socket issue

I don’t suppose there are any Rails users that could help me out with a problem I’m having. I’m new to Rails and to web programming generally and I’m trying to get my first Rails app deployed on-line. I’m stuck because I can’t run the rake db: migrate command to set up my production database. I’m using passenger, and I’ve got my app files where they need to be, as well as my database created, but when I run rake db:migrate using SSH (I use winSCP), I get this error:

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

I’m not sure where to go from here, and I could really use some help!

You probably don’t have the database hostname set correctly in your configuration file. The default is to try to use the local server for MySQL, which doesn’t work in systems like ours where the database is stored on a separate machine.

you were completely right-- i was using “hostname” instead of “host” in my database.yml file. Website’s still not working, but I think it must be some other issue that I can at least contant DH about. Thanks for your help!