Ruby on Rails: Database Connection Error

hey everyone

i have been having trouble connecting to my MySQL database using RoR. i have done exactly as the dh wiki says and have googled around to no avail.

database.yml setup is as follows: (development and test is the same as production)

adapter: mysql
database: photoblog
username: username
password: password

where i replace with my own and username and password to my own as well. i have also tried adding

port: 3306

to it but it still doesn’t work. I have also included the error message below. Any help? Thanks!


Mysql::Error in PhotoController#index

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

hm for some reason (with no changes) it started working…so problem solved?