Rails + MySQL: "Access denied for user" (bad DNS lookup?)

software development

#1

I’ve set up rails as instructed on the wiki, but am having a problem connecting from my rails app to the mysql database.

Here’s my database.yml:

development: &development
adapter: mysql2
encoding: utf8
database: fat_free_crm_development
pool: 5
username: agilitelabscom
password: ********
host: mysql.agilitelabs.com

production:
<<: *development
database: fat_free_crm_production

I’m using RAILS_ENV=production. When I try to run “rake db:migrate”, I get the following:

[cableboy]~/crm.johnpelly.com> rake db:migrate
rake aborted!
Access denied for user ‘agilitelabscom’@‘66.33.192.0/255.255.224.0’ to database ‘fat_free_crm_production’

I can connect to MySQL fine on the command line:

mysql -u agilitelabscom -p****** -h mysql.agilitelabs.com agilite_fat_free_crm_production

It looks like there’s a problem with reverse DNS lookup from rails - note how the error message says "@‘66.33.192.0/255.255.224.0’ " - looks like it’s not correctly identifying cableboy’s DNS name.

Any help appreciated!


#2

Does it connect using host: 208.97.172.212 ?


#3

Sorry all, DreamHost support alerted me to the fact that I had the wrong database name.

Great catch, guys! Really impressed w/your service.