Hi,
I am having a problem connecting to a remote mysql db and I can’t
figure out what the problem is. When I try to connect I get the error:
getaddrinfo: no address associated with hostname.
I have looked all over for clues as to what that means but I haven’t
been able to find anything that helps. I have no problems connecting
to the database with php and with the mysql query browser, I only have
problems connecting with rails and the settings in database.yml
correspond to the settings I have in php. I also don’t have any
problem connecting to the mysql db on my local machine. I have also
tried it on Windows and Mac OSX and I get the same error on both
platforms.
The remote db version is MySQL 4.0.15-standard. I have also granted
privelages for the user I am connecting with for all domains.
The trace gives me:
C:/InstantRails-1.0/ruby/lib/ruby/gems/1.8/gems/activerecord-1.14.3/lib/active_record/vendor/mysql.rb:108:in
initialize' C:/InstantRails-1.0/ruby/lib/ruby/gems/1.8/gems/activerecord-1.14.3/lib/active_record/vendor/mysql.rb:108:in
real_connect’
C:/InstantRails-1.0/ruby/lib/ruby/gems/1.8/gems/activerecord-1.14.3/lib/active_record/connection_adapters/mysql_adapter.rb:330:in
connect' C:/InstantRails-1.0/ruby/lib/ruby/gems/1.8/gems/activerecord-1.14.3/lib/active_record/connection_adapters/mysql_adapter.rb:87:in
initialize’
C:/InstantRails-1.0/ruby/lib/ruby/gems/1.8/gems/activerecord-1.14.3/lib/active_record/connection_adapters/mysql_adapter.rb:36:in
mysql_connection' C:/InstantRails-1.0/ruby/lib/ruby/gems/1.8/gems/activerecord-1.14.3/lib/active_record/connection_adapters/abstract/connection_specification.rb:251:in
connection_without_query_cache=’
C:/InstantRails-1.0/ruby/lib/ruby/gems/1.8/gems/activerecord-1.14.3/lib/active_record/query_cache.rb:54:in
connection=' C:/InstantRails-1.0/ruby/lib/ruby/gems/1.8/gems/activerecord-1.14.3/lib/active_record/connection_adapters/abstract/connection_specification.rb:220:in
retrieve_connection’
C:/InstantRails-1.0/ruby/lib/ruby/gems/1.8/gems/activerecord-1.14.3/lib/active_record/connection_adapters/abstract/connection_specification.rb:78:in
connection' C:/InstantRails-1.0/ruby/lib/ruby/gems/1.8/gems/activerecord-1.14.3/lib/active_record/base.rb:1046:in
add_limit!’
C:/InstantRails-1.0/ruby/lib/ruby/gems/1.8/gems/activerecord-1.14.3/lib/active_record/base.rb:1017:in
construct_finder_sql' C:/InstantRails-1.0/ruby/lib/ruby/gems/1.8/gems/activerecord-1.14.3/lib/active_record/base.rb:924:in
find_every’
C:/InstantRails-1.0/ruby/lib/ruby/gems/1.8/gems/activerecord-1.14.3/lib/active_record/base.rb:381:in
find' #{RAILS_ROOT}/app/controllers/intro_controller.rb:24:in
auth’
If anyone has an idea about what is going on I would really appreciate
it.
Thanks,
Jake