Project

General

Profile

Actions

Defect #2808

closed

Can't connect to a remote MySQL server

Added by Simon van der Linden over 15 years ago. Updated over 15 years ago.

Status:
Closed
Priority:
High
Assignee:
-
Category:
-
Target version:
-
Start date:
2009-02-23
Due date:
% Done:

0%

Estimated time:
Resolution:
Invalid
Affected version:

Description

My webserver is not the same as my SQL server, so I configured my database.yml file as follows:

production:
  adapter: mysql
  database: redmine
  username: redmine
  password: *****
  encoding: utf8
  host: storage

Note: storage is a resolvable hostname on the webserver.

But then, when I try to load a page, I get the following error:

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

/var/lib/gems/1.8/gems/activerecord-2.1.2/lib/active_record/connection_adapters/mysql_adapter.rb:527:in `real_connect'
/var/lib/gems/1.8/gems/activerecord-2.1.2/lib/active_record/connection_adapters/mysql_adapter.rb:527:in `connect'
/var/lib/gems/1.8/gems/activerecord-2.1.2/lib/active_record/connection_adapters/mysql_adapter.rb:186:in `initialize'
/var/lib/gems/1.8/gems/activerecord-2.1.2/lib/active_record/connection_adapters/mysql_adapter.rb:85:in `new'
/var/lib/gems/1.8/gems/activerecord-2.1.2/lib/active_record/connection_adapters/mysql_adapter.rb:85:in `mysql_connection'
/var/lib/gems/1.8/gems/activerecord-2.1.2/lib/active_record/connection_adapters/abstract/connection_specification.rb:292:in `send'
/var/lib/gems/1.8/gems/activerecord-2.1.2/lib/active_record/connection_adapters/abstract/connection_specification.rb:292:in `connection='
/var/lib/gems/1.8/gems/activerecord-2.1.2/lib/active_record/connection_adapters/abstract/connection_specification.rb:260:in `retrieve_connection'
/var/lib/gems/1.8/gems/activerecord-2.1.2/lib/active_record/connection_adapters/abstract/connection_specification.rb:78:in `connection'
/var/lib/gems/1.8/gems/activerecord-2.1.2/lib/active_record/query_cache.rb:8:in `cache'
/var/lib/gems/1.8/gems/actionpack-2.1.2/lib/action_controller/caching/sql_cache.rb:12:in `perform_action'
/var/lib/gems/1.8/gems/actionpack-2.1.2/lib/action_controller/base.rb:529:in `send'
/var/lib/gems/1.8/gems/actionpack-2.1.2/lib/action_controller/base.rb:529:in `process_without_filters'
/var/lib/gems/1.8/gems/actionpack-2.1.2/lib/action_controller/filters.rb:568:in `process_without_session_management_support'
/var/lib/gems/1.8/gems/actionpack-2.1.2/lib/action_controller/session_management.rb:130:in `process'
/var/lib/gems/1.8/gems/actionpack-2.1.2/lib/action_controller/base.rb:389:in `process'
/var/lib/gems/1.8/gems/rails-2.1.2/lib/fcgi_handler.rb:103:in `process_request'
/var/lib/gems/1.8/gems/rails-2.1.2/lib/fcgi_handler.rb:153:in `with_signal_handler'
/var/lib/gems/1.8/gems/rails-2.1.2/lib/fcgi_handler.rb:101:in `process_request'
/var/lib/gems/1.8/gems/rails-2.1.2/lib/fcgi_handler.rb:78:in `process_each_request'
/var/lib/gems/1.8/gems/rails-2.1.2/lib/fcgi_handler.rb:77:in `process_each_request'
/var/lib/gems/1.8/gems/rails-2.1.2/lib/fcgi_handler.rb:76:in `catch'
/var/lib/gems/1.8/gems/rails-2.1.2/lib/fcgi_handler.rb:76:in `process_each_request'
/var/lib/gems/1.8/gems/rails-2.1.2/lib/fcgi_handler.rb:50:in `process!'
/var/lib/gems/1.8/gems/rails-2.1.2/lib/fcgi_handler.rb:24:in `process!'

Honestly, I don't know anything about Rails, so maybe it is not the right place to report such a problem. Any help would be appreciated.

Actions

Also available in: Atom PDF