[prev in list] [next in list] [prev in thread] [next in thread] 

List:       macports-users
Subject:    Did location of mysql.sock change in mysql5.0.37?
From:       srogers1 () austin ! rr ! com (Steven Rogers)
Date:       2007-05-06 0:14:21
Message-ID: 452AB155-DF67-4647-96CE-FC934F5B3656 () austin ! rr ! com
[Download RAW message or body]


On May 5, 2007, at 10:02 PM, Bakki Kudva wrote:

> I am stumped now because the same upgrade on a MacBookPro seems to
> work fine. So something went awry when I upgraded the iMac. I just did
> a port -u update and didn't get any errors.


I had the same problem - rails works fine on one machine, and is  
looking for the MySQL socket in /tmp/mysql.sock on another after  
updating. I haven't been able to figure out what the difference is.

There are a number of ways to work around this:

1. adding the socket to database.yml - I didn't want to do this,  
because it's not the same on all my servers.

2. use 127.0.0.1 instead of localhost for the address, which forces  
uses of TCP/IP instead of sockets - I didn't want to do this because  
there are probably performance issues, or

3 create a link in the /tmp directory that points to the correct  
location (mine is in /opt):

$ ln -s /opt/local/var/run/mysql5/mysqld.sock /tmp/mysql.sock
however, I suspect this may be removed by any number of cleanup  
routines, including a restart, so it might need to be recreated  
occasionally. Still, for me this seems like the best option.

There may be something about Rails or its configuration that could  
cause this issue - if I figure it out, I'll post it.

Good luck,

SR


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic