[Koha] Trouble with MySQL, DBI/DBD::mysql

Chris Hammond-Thrasher hammondthrasher_c at usp.ac.fj
Wed Feb 7 14:28:27 NZDT 2007



I am trying to setup a replica of an environment currently running at the
Cook Islands National Library in order to diagnose two problems. It is a
Koha 2.2.6 install with MySQL 5.0 (I have made all of the documented sql
changes plus a couple of undocumented ones to support mysql 5 thanks to
"Katipo Chris") on Debian Sarge. All modules and system components are
installed, the /usr/local/koha directory tree has been restored from the
Cook Islands' backup as has the MySQL database. Everything looks good,
except that a browser call to opac_main.pl yields the following error in the
apache log:


DBI connect('CKI:localhost','kohaadmin',...) failed: Can't connect to local
MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) at
/usr/local/koha/intranet/modules/C4/Context.pm line 411

Can't call method "prepare" on an undefined value at opac-main.pl line 17.


Running a quick "mysqladmin version" revealed that mysql socket location is
actually /tmp/mysql.sock . However, /etc/mysql/my.cnf has both the client
and server socket set to /var/run/mysqld/mysqld.sock . So I changed all
mentions of /var/run/mysqld/mysqld.sock in my.cnf to /tmp/mysql.sock (and
even set and exported the MYSQL_UNIX_PORT env variable for good measure) and
restarted mysqld_safe, then requested opac-main.pl again and received the
same error above.


In summary, I cannot make mysqld_safe listen at anything other than
/tmp/mysql.sock and I cannot make perl DBI/DBD::mysql attempt to connect
anywhere other than /var/run/mysqld/mysqld.sock .


Any ideas?





Chris Hammond-Thrasher  MLIS

Library Systems Manager

University of the South Pacific

Suva, Fiji

+679 3232233

hammondthrasher_c at usp.ac.fj


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.katipo.co.nz/pipermail/koha/attachments/20070207/ce9552f1/attachment.html

More information about the Koha mailing list