bp_seqfeature_load.pl module cannot connect to mysql

Rodolfo Aramayo raramayo at gmail.com
Wed Oct 6 14:57:20 PDT 2010


Ryan,

Please see below

On Wed, Oct 6, 2010 at 16:04, Ryan Schmidt <ryandesign at macports.org> wrote:

> On Oct 6, 2010, at 15:49, Rodolfo Aramayo wrote:
>
> > Background:
> > Perl was installed via Macports.
> > Bioperl was installed via CPAN and seems to be installed in a MacPorts
> directory.
>
> I realize I have not yet committed the p5-bioperl port that was submitted,
> so you didn't really have a choice, but using CPAN to install into a
> MacPorts-owned directory can be problematic. For example, once I do commit
> p5-bioperl, if you try to install it, MacPorts will complain that the files
> it wants to install are already there and it doesn't know where they came
> from.
>
> I installed Perl and Python using ports and then proceeded to
install/activate cpan. Although I was expecting to be using the cpan located
in /usr/bin, somehow cpan got installed into my:

/opt/local/bin/cpan

directory

and since then has been working just fine. My active coan is located at:
/opt/local/bin

If I install anything via cpan, it installs fine. I use git to update
bioperl (I need to use the bleeding edge code) and it does it all right.
Updated code is properly installed into port directories...


>
> > I installed p5-dbd-mysql via ports
> > My server is running Apple MySQL so even though MySQL was installed as a
> dependency of p5-dbd-mysql, it is not being used because I do not know how
> to activate the ports one...(see below)
> >
> >
> > Problem:
> > Trying to load a database we rtun into the following
> > bp_seqfeature_load.pl -c -u "username" -p "password" -a DBI::mysql -d
> database data.fasta data.gff
> >
> > we run into the following error:
> >  ====
> > DBI connect('Ncrassa_scaffold','rsw3284',...) failed: Can't connect to
> local MySQL server through socket '/opt/local/var/run/mysql5/mysqld.sock'
> (2) at /opt/local/lib/perl5/site_perl/5.12.1/Bio/DB/SeqFeature/Store/DBI/
> mysql.pm line 217
> >
> > -------------------- EXCEPTION --------------------
> > MSG: Can't connect to local MySQL server through socket
> '/opt/local/var/run/mysql5/mysqld.sock' (2)
> > STACK Bio::DB::SeqFeature::Store::DBI::mysql::init
> /opt/local/lib/perl5/site_perl/5.12.1/Bio/DB/SeqFeature/Store/DBI/
> mysql.pm:217
> > STACK Bio::DB::SeqFeature::Store::new
> /opt/local/lib/perl5/site_perl/5.12.1/Bio/DB/SeqFeature/Store.pm:386
> > STACK toplevel /opt/local/bin/bp_seqfeature_load.pl:101
> > ====
> >
> > MySQL appears to be trying to use '/opt/local/var/run/mysql5/mysqld.sock'
> which does not exist.
> >
> > Solution: I solved this problem by going to directory:
> >
> > /opt/local/var/run/
> >
> > which exists and there I created a directory called mysql5
> > >mkdir -pv mysql5
> > >cd mysql5
> > And a link to the MySQL socket present in /var/mysql
> >
> > >sudo ln -s /var/mysql/mysql.sock mysqld.sock
> >
> > and that solved the problem
> >
> > I believe this is a bug? that might need to be fixed?
>
> What do you believe the bug is; what should be changed? If the MySQL
> daemon's socket is not at the usual MacPorts location of
> /opt/local/var/run/mysql5/mysqld.sock but somewhere else, you need to inform
> your MySQL client where that is. I believe that's done by editing the my.cnf
> file.
>

To what my.cnf file are you referring to? The one located at: /private/etc/
sends mysql to /var/mysql/mysql.sock
Is there a MacPorts my.cnf file? Where is it located?

>
>
> > Regardless, this way I am running p5-dbd-mysql with Apple mysql which it
> might not be optimal but allowed me to have the computer ready for class
>
> Apple MySQL... so you are running Mac OS X Server? Apple does not include
> MySQL in the consumer version of Mac OS X.
>
>
> > So how do I switch to the ports MySQL?
>
> Instructions for using MacPorts MySQL are included in the MAMP how-to
> document:
>
> http://trac.macports.org/wiki/howto/MAMP#mysql
>
>
Thanks for this

--R
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-users/attachments/20101006/5a7ce799/attachment.html>


More information about the macports-users mailing list