# What happened to mysql connection?

**URL:** <https://www.ruby-forum.com/t/what-happened-to-mysql-connection/48053>\
**Category:** Rails\
**Created:** [November 16, 2005, 9:46am UTC](https://www.ruby-forum.com/t/what-happened-to-mysql-connection/48053 "2005-11-16T09:46:57Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![segabor](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/91b2a8/32.png) [@segabor](https://www.ruby-forum.com/u/segabor)\
**Post date:** [November 16, 2005, 9:46am UTC](https://www.ruby-forum.com/t/what-happened-to-mysql-connection/48053/1 "2005-11-16T09:46:57Z")

</div>

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:in`new’  
/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:in`mysql\_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:in`connection\_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:in`retrieve\_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:in`add\_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:in`find’  
/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:in`pre\_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:in`call\_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:in`call\_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:in`perform\_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:in`measure’  
/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:in`perform\_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:in`process\_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:in`dispatch’  
/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:in`service’  
/opt/local/lib/ruby/1.8/webrick/httpserver.rb:104:in `service' /opt/local/lib/ruby/1.8/webrick/httpserver.rb:65:in`run’  
/opt/local/lib/ruby/1.8/webrick/server.rb:155:in `start_thread' /opt/local/lib/ruby/1.8/webrick/server.rb:144:in`start’  
/opt/local/lib/ruby/1.8/webrick/server.rb:144:in `start_thread' /opt/local/lib/ruby/1.8/webrick/server.rb:94:in`start’  
/opt/local/lib/ruby/1.8/webrick/server.rb:89:in `each' /opt/local/lib/ruby/1.8/webrick/server.rb:89:in`start’  
/opt/local/lib/ruby/1.8/webrick/server.rb:79:in `start' /opt/local/lib/ruby/1.8/webrick/server.rb:79:in`start’  
/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

---

<div class="post-metadata">

**Author:** ![segabor](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/91b2a8/32.png) [@segabor](https://www.ruby-forum.com/u/segabor)\
**Post date:** [November 16, 2005, 10:23am UTC](https://www.ruby-forum.com/t/what-happened-to-mysql-connection/48053/2 "2005-11-16T10:23:10Z")

</div>

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 🙂

Warmest regards,  
Nathan.

* * *

Nathaniel S. H. Brown Toll Free 1.877.4.INIMIT  
Inimit Innovations Phone 604.724.6624  
[www.inimit.com](http://www.inimit.com) Fax 604.444.9942

---

<div class="post-metadata">

**Author:** ![segabor](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/91b2a8/32.png) [@segabor](https://www.ruby-forum.com/u/segabor)\
**Post date:** [November 16, 2005, 10:41am UTC](https://www.ruby-forum.com/t/what-happened-to-mysql-connection/48053/3 "2005-11-16T10:41:24Z")

</div>

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.”

---

<div class="post-metadata">

**Author:** ![segabor](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/91b2a8/32.png) [@segabor](https://www.ruby-forum.com/u/segabor)\
**Post date:** [November 16, 2005, 10:25pm UTC](https://www.ruby-forum.com/t/what-happened-to-mysql-connection/48053/4 "2005-11-16T22:25:52Z")

</div>

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 …”

---

<div class="post-metadata">

**Author:** ![segabor](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/91b2a8/32.png) [@segabor](https://www.ruby-forum.com/u/segabor)\
**Post date:** [November 16, 2005, 10:40pm UTC](https://www.ruby-forum.com/t/what-happened-to-mysql-connection/48053/5 "2005-11-16T22:40:56Z")

</div>

-----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-----
