bp_seqfeature_load.pl module cannot connect to mysql

Rodolfo Aramayo raramayo at gmail.com
Wed Oct 6 13:49:12 PDT 2010


People,

Background:
Perl was installed via Macports.
Bioperl was installed via CPAN and seems to be installed in a MacPorts
directory.
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.pmline
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? 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

So how do I switch to the ports MySQL?

Thanks

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


More information about the macports-users mailing list