Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#29 Mysql Socket Problem

closed
nobody
None
5
2011-09-09
2011-09-09
Hemant
No

I am trying to get a codestriker server up using with mysql as database.
The mysql repository is in custom path instead of the standard path. I have modified the /etc/my.conf to read
<snip>
[client]
socket=/srv/mysql/mysql.sock

[mysqld]
datadir=/srv/mysql
socket=/srv/mysql/mysql.sock
</snip>

It works fine with the local mysql client.

However when I try to run install.pl in codestriker I get the following error:

DBI connect('dbname=codestrikerdb','codestriker',...) failed: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (13) at /var/www/codestriker/codestriker-1.9.10/lib/Codestriker/DB/Database.pm line 61

I am not able to proceed further due to this error.

Expected behavior: Codestriker should try to connect to any mysql socket instead of the default one.

Discussion

  • Hemant
    Hemant
    2011-09-09

    Fixes mysql socket issue

     
  • David Sitsky
    David Sitsky
    2011-09-09

    • status: open --> closed
     
  • David Sitsky
    David Sitsky
    2011-09-09

    Codestriker is just using your mysql libraries on your system - it has no knowledge of where it is installed. I am guessing you must have multiple MySQL client installs on your box, and the user running apache is pulling in a different one - probably due to a different LD_LIBRARY_PATH setting.

    A workaround might be to connect to the MySQL server using localhost as the address.