Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Denarius

macrumors 6502a
Original poster
Feb 5, 2008
690
0
Gironde, France
Okay, I've just installed the lovely new mysql community server for leopard package x86_64 flavour. It works a treat out of the box, no problems, apart from...

in terminal, 'mysql_config --socket'
returns '/tmp/mysql.sock'
Checking in '/private/etc/my.cnf' shows:
'socket = /var/mysql/mysql.sock'
Then having done '/usr/libexec/locate.updatedb'
followed by 'locate mysql.sock'
that returns '/private/var/mysql/mysql.sock'!

In a nutshell mysql thinks its socket is in 2 different locations, neither of which is correct.

I know it's working and everything, but I'm just starting to mess around with rails, which works when I prescribe socket: /private/var/mysql/mysql.sock
in database.yml, but I'd much rather it got the correct value from mysql_config in the first place.

Any thoughts on how to get mysql to figure out where its socket actually is would be very welcome.
 

Cromulent

macrumors 604
Oct 2, 2006
6,813
1,100
The Land of Hope and Glory
/var is just a symlink to /private/var in Mac OS X. They are one and the same.

/private/var is the real directory though.

For reference /tmp is a symlink to /private/tmp as well. As /etc is to /private/etc.
 

Denarius

macrumors 6502a
Original poster
Feb 5, 2008
690
0
Gironde, France
/var is just a symlink to /private/var in Mac OS X. They are one and the same.

/private/var is the real directory though.

For reference /tmp is a symlink to /private/tmp as well. As /etc is to /private/etc.

That's useful information, thank you very much.

Incidentally, I think I've just found the answer:
tried sudo vi /usr/local/mysql/bin/mysql_config and discovered I could go through and change the socket location. So now it agrees with my.cnf

Funny one! :)
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.