What happened to mysql connection?

I’ve been using Rails for more than six months and until today I had
no problem with mysql connection.
It’s a Mac OS X 10.4 box having rails installed and updated by gem. I
use a remote mysql server no local instance installed.
Here’s my config:

development:
adapter: mysql
database: hdchat
host: 10.0.0.1
username: webuser
password:

test:
adapter: mysql
database: rails_test
host: 10.0.0.1
username: webuser
password:

production:
adapter: mysql
database: hdchat
host: 10.0.0.1
username: webuser
password:

Until today rails with this config ran fine. Today morning I wanted
to continue my work. After starting my app I got the following error:

Errno::ENOENT in #

No such file or directory - /tmp/mysql.sock
RAILS_ROOT: ./script/…/config/…/

Application Trace | Framework Trace | Full Trace
/opt/local/lib/ruby/gems/1.8/gems/activerecord-1.13.0/lib/
active_record/vendor/mysql411.rb:43:in initialize' /opt/local/lib/ruby/gems/1.8/gems/activerecord-1.13.0/lib/ active_record/vendor/mysql411.rb:43:innew’
/opt/local/lib/ruby/gems/1.8/gems/activerecord-1.13.0/lib/
active_record/vendor/mysql411.rb:43:in real_connect' /opt/local/lib/ruby/gems/1.8/gems/activerecord-1.13.0/lib/ active_record/connection_adapters/mysql_adapter.rb:42:inmysql_connection’
/opt/local/lib/ruby/gems/1.8/gems/activerecord-1.13.0/lib/
active_record/connection_adapters/abstract/
connection_specification.rb:121:in send' /opt/local/lib/ruby/gems/1.8/gems/activerecord-1.13.0/lib/ active_record/connection_adapters/abstract/ connection_specification.rb:121:inconnection_without_query_cache=’
/opt/local/lib/ruby/gems/1.8/gems/activerecord-1.13.0/lib/
active_record/query_cache.rb:54:in connection=' /opt/local/lib/ruby/gems/1.8/gems/activerecord-1.13.0/lib/ active_record/connection_adapters/abstract/ connection_specification.rb:83:inretrieve_connection’
/opt/local/lib/ruby/gems/1.8/gems/activerecord-1.13.0/lib/
active_record/base.rb:253:in connection' /opt/local/lib/ruby/gems/1.8/gems/activerecord-1.13.0/lib/ active_record/base.rb:937:inadd_limit!’
/opt/local/lib/ruby/gems/1.8/gems/activerecord-1.13.0/lib/
active_record/base.rb:930:in construct_finder_sql' /opt/local/lib/ruby/gems/1.8/gems/activerecord-1.13.0/lib/ active_record/base.rb:411:infind’
/opt/local/lib/ruby/gems/1.8/gems/activerecord-1.13.0/lib/
active_record/base.rb:409:in find' #{RAILS_ROOT}app/controllers/customer_controller.rb:13:inpre_check’
/opt/local/lib/ruby/gems/1.8/gems/actionpack-1.11.0/lib/
action_controller/filters.rb:354:in send' /opt/local/lib/ruby/gems/1.8/gems/actionpack-1.11.0/lib/ action_controller/filters.rb:354:incall_filters’
/opt/local/lib/ruby/gems/1.8/gems/actionpack-1.11.0/lib/
action_controller/filters.rb:350:in each' /opt/local/lib/ruby/gems/1.8/gems/actionpack-1.11.0/lib/ action_controller/filters.rb:350:incall_filters’
/opt/local/lib/ruby/gems/1.8/gems/actionpack-1.11.0/lib/
action_controller/filters.rb:339:in before_action' /opt/local/lib/ruby/gems/1.8/gems/actionpack-1.11.0/lib/ action_controller/filters.rb:331:inperform_action_without_benchmark’
/opt/local/lib/ruby/gems/1.8/gems/actionpack-1.11.0/lib/
action_controller/benchmarking.rb:69:in perform_action_without_rescue' /opt/local/lib/ruby/gems/1.8/gems/actionpack-1.11.0/lib/ action_controller/benchmarking.rb:69:inmeasure’
/opt/local/lib/ruby/gems/1.8/gems/actionpack-1.11.0/lib/
action_controller/benchmarking.rb:69:in perform_action_without_rescue' /opt/local/lib/ruby/gems/1.8/gems/actionpack-1.11.0/lib/ action_controller/rescue.rb:82:inperform_action’
/opt/local/lib/ruby/gems/1.8/gems/actionpack-1.11.0/lib/
action_controller/base.rb:365:in send' /opt/local/lib/ruby/gems/1.8/gems/actionpack-1.11.0/lib/ action_controller/base.rb:365:inprocess_without_session_management_support’
/opt/local/lib/ruby/gems/1.8/gems/actionpack-1.11.0/lib/
action_controller/session_management.rb:116:in process' /opt/local/lib/ruby/gems/1.8/gems/rails-0.14.3/lib/dispatcher.rb: 38:indispatch’
/opt/local/lib/ruby/gems/1.8/gems/rails-0.14.3/lib/webrick_server.rb:
117:in handle_dispatch' /opt/local/lib/ruby/gems/1.8/gems/rails-0.14.3/lib/webrick_server.rb: 83:inservice’
/opt/local/lib/ruby/1.8/webrick/httpserver.rb:104:in service' /opt/local/lib/ruby/1.8/webrick/httpserver.rb:65:inrun’
/opt/local/lib/ruby/1.8/webrick/server.rb:155:in start_thread' /opt/local/lib/ruby/1.8/webrick/server.rb:144:instart’
/opt/local/lib/ruby/1.8/webrick/server.rb:144:in start_thread' /opt/local/lib/ruby/1.8/webrick/server.rb:94:instart’
/opt/local/lib/ruby/1.8/webrick/server.rb:89:in each' /opt/local/lib/ruby/1.8/webrick/server.rb:89:instart’
/opt/local/lib/ruby/1.8/webrick/server.rb:79:in start' /opt/local/lib/ruby/1.8/webrick/server.rb:79:instart’
/opt/local/lib/ruby/gems/1.8/gems/rails-0.14.3/lib/webrick_server.rb:
69:in `dispatch’
script/server:50
Request

Parameters: None

Show session dump

Response

Headers: {“cookie”=>[], “Cache-Control”=>“no-cache”}

So what the heck is this? The only thing I did prior this that I
downloaded the latest Java 1.5 update to Mac OS X but guess it
wouldn’t affect rails setup.
Please help me.
Thanks!

Gábor

“Put your message in a modem and throw it in the Cyber Sea.” - N. Peart

I had this same problem when I had used an IP address instead of using
“localhost” as the hostname on my fedora box, where my IP xx.xx.xx.xx
was
the same as the local server.

Also, you might want to specify a valid test database as well, not sure
if
that would help this specifically, but it very well may :slight_smile:

Warmest regards,
Nathan.


Nathaniel S. H. Brown Toll Free 1.877.4.INIMIT
Inimit Innovations Phone 604.724.6624
www.inimit.com Fax 604.444.9942

On 2005.11.16., at 10:20, Nathaniel S. H. Brown wrote:

I had this same problem when I had used an IP address instead of using
“localhost” as the hostname on my fedora box, where my IP
xx.xx.xx.xx was
the same as the local server.

As I mentioned I don’t use local mysql and I don’t have it installed
to my machine. The working one is running on a FreeBSD server. Last
night connection had no problem today it does.

“Earth is a beta site.”

On 2005.11.16., at 9:45, Gábor SEBESTYÉN wrote:

Until today rails with this config ran fine. Today morning I wanted
to continue my work. …:

My mistake, sorry.

Gábor

“Kinek nem inge, ne vegye gatyára …”

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Nov 16, 2005, at 1:22 PM, Gábor SEBESTYÉN wrote:

On 2005.11.16., at 9:45, Gábor SEBESTYÉN wrote:

Until today rails with this config ran fine. Today morning I
wanted to continue my work. …:

My mistake, sorry.

What was the mistake?

jeremy
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (Darwin)

iD8DBQFDe6a3AQHALep9HFYRArj5AKDOusR3ZB7dsuX1boztEMMh3ZMSgQCgzi1M
YN42Y0h/D8+HFWZxqD04miI=
=VvJd
-----END PGP SIGNATURE-----