On 3.5.2007, at 10.47, Ryan Schmidt wrote:
On May 2, 2007, at 10:53, Bakki Kudva wrote:
My rails app is complaining that it can't find mysql.sock in /tmp
after upgrading. Before the defaults just worked. Now it appears that
it is in /opt/local/var/run/mysql5 - so I either have to set it in
my.cnf or change my rails configuration.
The MacPorts MySQL socket has never been in /tmp, to the best of my
knowledge. The official binary distribution of MySQL from http://
dev.mysql.com does use that location, however.
When using the MacPorts php5 port with the MacPorts mysql5 port,
they "just work." PHP knows where the MySQL socket is. I don't use
Ruby, but I would have hoped that MacPorts Ruby would also "just
work" with MacPorts MySQL.
Perhaps the rail app can be told to make use of mysql_config (/opt/
local/bin/mysql_config5) that knows the socket location (as follows):
[EMAIL PROTECTED]:tmp> mysql_config5
Usage: /opt/local/bin/mysql_config5 [OPTIONS]
Options:
--cflags [-I/opt/local/include/mysql5/mysql]
--include [-I/opt/local/include/mysql5/mysql]
--libs [-L/opt/local/lib/mysql5/mysql -
lmysqlclient -L/opt/local/lib -lz -lm -L/opt/local/lib -lssl -lcrypto]
--libs_r [-L/opt/local/lib/mysql5/mysql -
lmysqlclient_r -L/opt/local/lib -lz -lm -L/opt/local/lib -lssl -
lcrypto]
--socket [/opt/local/var/run/mysql5/mysqld.sock]
--port [3306]
--version [5.0.37]
--libmysqld-libs [-L/opt/local/lib/mysql5/mysql -lmysqld -L/
opt/local/lib -lz -lm -L/opt/local/lib -lssl -lcrypto]
[EMAIL PROTECTED]:tmp> mysql_config5 --socket
/opt/local/var/run/mysql5/mysqld.sock
[EMAIL PROTECTED]:tmp>
!
! Jyrki Wahlstedt
! skype:jyrkiwahlstedt
! http://www.wahlstedt.fi/jyrki/
!
! Our life is no dream; but it ought to become one and perhaps will.
! PGP key ID: 0x139CC386 fingerprint: F355 B46F 026C B8C1 89C0 A780
6366 EFD9 139C C386
_______________________________________________
macports-users mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo/macports-users