[rt-users] mysql.sock moved, and RT can't find it

Steve Sizemore steve at ls.berkeley.edu
Thu Jan 13 17:31:32 EST 2005


On Thu, 13 Jan 2005, Matt Hempel wrote:

> Steve Sizemore wrote:
> 
> >On Thu, Jan 13, 2005 at 04:36:45PM +0300, Ruslan U. Zakirov wrote:
> > 
> >
> >>Steve Sizemore wrote:
> >>   
> >>
> >>>I have moved the mysql socket from it's default location (/tmp) to
> >>>/var/run/mysql, for reasons of security. rt seems to ignore my.cnf,
> >>>and continues to look for it in /tmp. I have (temporarily) made it
> >>>work again, by using a symbolic link, but I'd really like to figure
> >>>out how to tell rt where to find the real socket.
> >>>
> >>>Any help out there?
> >>>
> >>>rt-3.2.2
> >>>mysql-4.0.23a
> >>>apache-2.0.52
> >>>FreeBSD 4.10
> 
> Look for mysql.pm in your perl DBD install.  There's a variable 
> "mysql_socket" that appears to be the default ... reset it to the new 
> path and give RT another shot (remembering to restart apache afterwards).

Yes, I did that before I posted my original message. (I also just redid
it, to be sure that I didn't miss something the first time.) There is
no variable in the perl code with that name. There is something in a C
program (dbdimp.c), but it's not clear where it's getting the value,
or how I'd go about resetting it.

> Alternatively, grep around for the old path in the RT source and the 
> DBD.  That's how I found it on my box:

Nope, nothing there.

I did narrow it down, though (I think) to
/usr/local/rt3/lib/RT/Handle.pm, which is the RT module that sets up
the connection to mysql. There's nothing in there that specifies the
socket name, though, so I guess that hasn't been added to RT.

> [root at support etc]# grep mysql_sock 
> /usr/lib/perl5/site_perl/5.8.5/i386-linux-thread-multi/*/*
> /usr/lib/perl5/site_perl/5.8.5/i386-linux-thread-multi/DBD/mysql.pm:    
> mysql_socket=/dev/mysql

That's just from the man page - not real perl code. :-(

Still, all this shouldn't really be necessary. If RT (or Perl DBD)
would respect /etc/my.cnf, life would be easy.

Steve
-- 
Steve Sizemore <steve (at) ls.berkeley.edu>, (510) 642-8570
Unix System Manager
    Dept. of Mathematics and College of Letters and Science
    University of California, Berkeley
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
URL: <http://lists.bestpractical.com/pipermail/rt-users/attachments/20050113/f48b3d97/attachment.sig>


More information about the rt-users mailing list