Can't connect to mysql from rails
Posted by: sebastian
Posted on: 2007-08-23 07:07:00
Hi
I really can't figure out why my RoR app can't connect to the DB.
I have been working all day trying to deploy my application and finally got it almost right, but now I get an 505 error and when checking the production log I am told the following:
Mysql::Error (Access denied for user 'eurytmih'@'eros.dreamhost.com' (using password: YES)):
I can log in to my db server from the command line when SSH-ing to the server and when checking in the dreamhost panel I see that DB access is restricted to %.dreamhost.com, which should be fine since the DB is being accessed by eros.dreamhost.com.
My database.yml looks like this:
production:
adapter: mysql
database: webside_production
username: *******
password: *******
host: *******
I am able to log in from the command line with exactly the same information, but my RoR app can't...
What also strikes me as a little odd is that I had problems when trying to run the migrations on the server. For some reasons it tried to use the development environment, when I forced it to deploy using the production environment it worked though. But this can't be the case with this error listed above because the username being used on my local machine when developing is a totally different one!
Hope you have any suggestions!
Best regards
Sebastian