Ruby on Rails: Database Connection Error

Ruby on Rails: Database Connection Error

Posted by: bdotdub
Posted on: 2007-03-23 13:17:00

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)

production:
adapter: mysql
database: photoblog
username: username
password: password
host: mysql.domain.com

where i replace domain.com 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)

Re: Ruby on Rails: Database Connection Error

Posted by: bdotdub
Posted on: 2007-03-23 15:23:00

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

Tags: ruby on railsto no availmysql databasegoogledmysql servermysql errorpassword hostport 3306ymlrordatabase connectionphotoblogdherror messagewiki