[DAS] mysql.sock trouble
Steve Chervitz
sac@bioperl.org
Mon, 20 May 2002 13:04:48 -0700 (PDT)
Thanks for the replies. The symlink trick works. The /etc/my.cnf file didn't
work. I stopped mysqld, created the /etc/my.cnf file, re-started mysqld, but
ldas_load.pl still throws a DBI->connect error complaining that it can't
connect via /tmp/mysql.sock. If I then create symlink and re-try, it's happy.
I also tried uninstalling and re-installing mysql (from rpms) with the
/etc/my.cnf file in place. Still no go.
Steve
--- Lincoln Stein <lstein@cshl.org> wrote:
> I think this has been addressed already (I'm reading my e-mail backwards),
> but the best of all solution to is set the socket path correctly in
> /etc/my.cnf:
>
> [client]
> port = 3306
> socket = /var/lib/mysql/mysql.sock
>
> [mysqld]
> datadir=/var/lib/mysql
> socket=/var/lib/mysql/mysql.sock
>
> These two stanzas tell both the client and the server to use the same socket.
>
> Lincoln
>
>
>
>
> On Saturday 18 May 2002 00:01, Leonardo Marino-Ramirez wrote:
> > Steve,
> >
> > I think that I found something that could be useful to you:
> >
> > http://www.mysql.com/doc/C/a/Can_not_connect_to_server.html and
> > http://www.mysql.com/doc/P/r/Problems_with_mysql.sock.html
> >
> > in synthesis you can try to symlink it: "ln -s /var/lib/mysql/mysql.sock
> > /tmp"
> >
> > I hope it works for you.
> >
> > Leonardo
> >
> > On Fri, 17 May 2002, Steve Chervitz wrote:
> > > 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/ca
> > >ching_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/ca
> > >ching_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/my
> > >sql.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/my
> > >sqlopt.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
> > > _______________________________________________
> > > DAS mailing list
> > > DAS@biodas.org
> > > http://biodas.org/mailman/listinfo/das
> _______________________________________________
> DAS mailing list
> DAS@biodas.org
> http://biodas.org/mailman/listinfo/das
=====
Steve Chervitz
sac@bioperl.org
__________________________________________________
Do You Yahoo!?
LAUNCH - Your Yahoo! Music Experience
http://launch.yahoo.com