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

Matt Hempel matt at linuxconsultant.biz
Thu Jan 13 12:25:06 EST 2005


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
>>>      
>>>
>>RT uses my.cnf like all other mysql client libs. May be you put socket 
>>configuration to wrong block in my.cnf.
>>    
>>
>
>I put it in the client block -
>
> [client]
> port            = 3306
> socket          = /var/run/mysql/mysql.sock
>
>which works for other clients, like mod_php. Where else would it go?
>
>
>
>On Thu, Jan 13, 2005 at 09:14:05AM -0700, Joe Benson wrote:
>  
>
>>Make sure you don't have two my.cnf files.  I don't know about FreeBSD, 
>>I run Linux, but Redhat  default rpms would put a my.cnf file in  /etc.
>>    
>>
>
>Yes, I did have two - /etc/my.cnf and /usr/local/etc/my.cnf, but there
>was hardly anything in /usr/local/etc/my.cnf; neither removing it, nor
>linking it to /etc/my.cnf makes any difference. (mysql on FreeBSD looks
>at /etc/my.cnf.)
>
>
>So, I'm still looking for ideas...
>
>Thanks.
>Steve
>  
>

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

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

[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
[root at support etc]#

--m




More information about the rt-users mailing list