------art_409_4824766.1214378992809
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

I think the socket on which your remote server is different from
/tmp/mysql.sock.
Just check with the socket and then place the same thing on the database.yml
.
cheers,
kranthi

On Tue, Jun 24, 2008 at 12:58 AM, <wedix / mac.com> wrote:

> Hello,
>
> I have 1 DB server (MySQL) and 1 server with my application. I've
> setup the host in my database.yml file to match my DB server. When I
> run the application, I get this error:
>
> Errno::ENOENT in TestController#index
> No such file or directory - /tmp/mysql.sock
>
> --- Full Trace ---
> /usr/local/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/
> vendor/mysql.rb:107:in `initialize'
> /usr/local/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/
> vendor/mysql.rb:107:in `new'
> /usr/local/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/
> vendor/mysql.rb:107:in `real_connect'
> /usr/local/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/
> connection_adapters/mysql_adapter.rb:505:in `connect'
> /usr/local/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/
> connection_adapters/mysql_adapter.rb:183:in `initialize'
> /usr/local/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/
> connection_adapters/mysql_adapter.rb:88:in `new'
> /usr/local/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/
> connection_adapters/mysql_adapter.rb:88:in `mysql_connection'
> /usr/local/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/
> connection_adapters/abstract/connection_specification.rb:292:in `send'
> /usr/local/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/
> connection_adapters/abstract/connection_specification.rb:292:in
> `connection> /usr/local/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/
> connection_adapters/abstract/connection_specification.rb:260:in
> `retrieve_connection'
> /usr/local/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/
> connection_adapters/abstract/connection_specification.rb:78:in
> `connection'
> /usr/local/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/
> query_cache.rb:8:in `cache'
> /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/
> action_controller/caching/sql_cache.rb:12:in `perform_action'
> /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/
> action_controller/base.rb:529:in `send'
> /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/
> action_controller/base.rb:529:in `process_without_filters'
> /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/
> action_controller/filters.rb:569:in
> `process_without_session_management_support'
> /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/
> action_controller/session_management.rb:130:in `process'
> /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/
> action_controller/base.rb:389:in `process'
> /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/
> action_controller/dispatcher.rb:149:in `handle_request'
> /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/
> action_controller/dispatcher.rb:107:in `dispatch'
> /usr/local/lib/ruby/1.8/thread.rb:135:in `synchronize'
> /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/
> action_controller/dispatcher.rb:104:in `dispatch'
> /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/
> action_controller/dispatcher.rb:120:in `dispatch_cgi'
> /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/
> action_controller/dispatcher.rb:35:in `dispatch'
> /usr/local/lib/ruby/gems/1.8/gems/rails-2.1.0/lib/fcgi_handler.rb:
> 103:in `process_request'
> /usr/local/lib/ruby/gems/1.8/gems/rails-2.1.0/lib/fcgi_handler.rb:
> 153:in `with_signal_handler'
> /usr/local/lib/ruby/gems/1.8/gems/rails-2.1.0/lib/fcgi_handler.rb:
> 101:in `process_request'
> /usr/local/lib/ruby/gems/1.8/gems/rails-2.1.0/lib/fcgi_handler.rb:
> 78:in `process_each_request'
> /usr/local/lib/ruby/gems/1.8/gems/fcgi-0.8.7/lib/fcgi.rb:612:in
> `each_cgi'
> /usr/local/lib/ruby/gems/1.8/gems/fcgi-0.8.7/lib/fcgi.rb:609:in `each'
> /usr/local/lib/ruby/gems/1.8/gems/fcgi-0.8.7/lib/fcgi.rb:609:in
> `each_cgi'
> /usr/local/lib/ruby/gems/1.8/gems/rails-2.1.0/lib/fcgi_handler.rb:
> 77:in `process_each_request'
> /usr/local/lib/ruby/gems/1.8/gems/rails-2.1.0/lib/fcgi_handler.rb:
> 76:in `catch'
> /usr/local/lib/ruby/gems/1.8/gems/rails-2.1.0/lib/fcgi_handler.rb:
> 76:in `process_each_request'
> /usr/local/lib/ruby/gems/1.8/gems/rails-2.1.0/lib/fcgi_handler.rb:
> 50:in `process!'
> /usr/local/lib/ruby/gems/1.8/gems/rails-2.1.0/lib/fcgi_handler.rb:
> 24:in `process!'
> /path/to/my/public_html/public/dispatch.fcgi:26
> --- ---
>
> --- database.yml ---
> development:
>  adapter: mysql
>  encoding: utf8
>  database: Test_App_development
>  username: root
>  password:
>  host: dbserver
>
> test:
>  adapter: mysql
>  encoding: utf8
>  database: Test_App_test
>  username: root
>  password:
>  host: dbserver
>
> production:
>  adapter: mysql
>  encoding: utf8
>  database: Test_App_production
>  username: root
>  password:
>  host: dbserver
> --- ---
>
> The MySQL gem is installed. I'm not sure what's wrong...
>
> Any help is appreciated!
>
> Thank you,
>
>
> - wedix
>
>

------art_409_4824766.1214378992809--