[DAS] mysql.sock trouble

Steve Chervitz sac@bioperl.org
Fri, 17 May 2002 19:20:41 -0700 (PDT)


DAS folks,

This may be more of a mysql issue than a DAS issue, and is more of an FYI since
I have a mostly satisfactory resolution, but I was getting a connection error
when using the ldas_load.pl script:

$ ldas_load.pl --create --database dicty test.das 
DBI->connect(dicty) failed: Can't connect to local MySQL server through socket
'/tmp/mysql.sock' (111) at
/nfs/linux/pkg/perl/build-1/lib/site_perl/5.6.1/Bio/DB/GFF/Adaptor/dbi/caching_handle.pm
line 140
------------- EXCEPTION: Bio::Root::Exception -------------
MSG: Can't connect to database: Can't connect to local MySQL server through
socket '/tmp/mysql.sock' (111)
STACK: Error::throw
STACK: Bio::Root::Root::throw
/nfs/linux/pkg/perl/build-1/lib/site_perl/5.6.1/Bio/Root/Root.pm:315
STACK: Bio::DB::GFF::Adaptor::dbi::caching_handle::new
/nfs/linux/pkg/perl/build-1/lib/site_perl/5.6.1/Bio/DB/GFF/Adaptor/dbi/caching_handle.pm:90
STACK: Bio::DB::GFF::Adaptor::dbi::new
/nfs/linux/pkg/perl/build-1/lib/site_perl/5.6.1/Bio/DB/GFF/Adaptor/dbi.pm:74
STACK: Bio::DB::GFF::Adaptor::dbi::mysql::new
/nfs/linux/pkg/perl/build-1/lib/site_perl/5.6.1/Bio/DB/GFF/Adaptor/dbi/mysql.pm:253
STACK: Bio::DB::GFF::Adaptor::dbi::mysqlopt::new
/nfs/linux/pkg/perl/build-1/lib/site_perl/5.6.1/Bio/DB/GFF/Adaptor/dbi/mysqlopt.pm:149
STACK: Bio::DB::GFF::new
/nfs/linux/pkg/perl/build-1/lib/site_perl/5.6.1/Bio/DB/GFF.pm:550
STACK: /usr/local/bin/ldas_load.pl:50
-----------------------------------------------------------

I could succesfully connect to the dicty database using mysql on the
command-line, so my mysql setup appeared OK.

My /tmp/mysql.sock was apparently defunct, probably from an old mysql install
that I did over a year ago. The real socket from the latest mysql installation
was at /var/lib/mysql/mysql.sock and wasn't been recognized. I tried deleting
/tmp/mysql.sock and re-installing LDasServer, but still no go.

Problem was solved by restarting mysqld with --socket=/tmp/mysql.sock

This however created another annoyance in that the mysqladmin now requires that
I specify the --socket, since it defaults to /var/lib/mysql/mysql.sock.

So it seems I have to use /tmp/mysql.sock to appease the LDasServer, but it
complicates my mysql installation. Any suggestions from the mysql jocks out
there?

Here's my version info:
mysqladmin  Ver 8.23 Distrib 3.23.49a, for pc-linux-gnu on i686

Steve


=====
Steve Chervitz
sac@bioperl.org

__________________________________________________
Do You Yahoo!?
LAUNCH - Your Yahoo! Music Experience
http://launch.yahoo.com