<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:"Bitstream Vera Sans [bitstream]", "helvetica", sans-serif;font-size:13pt"><DIV>Hi Jan,<BR></DIV><DIV><BR></DIV><DIV>I get the following error msg when I run your script:</DIV><DIV><BR></DIV><DIV>[root@bxiew Desktop]# perl for_grace.pl<BR>DBD::mysql::st execute failed: Lost connection to MySQL server during query at /src/ensembl/modules/Bio/EnsEMBL/DBSQL/AnalysisAdaptor.pm line 118.<BR>DBD::mysql::st execute failed: Lost connection to MySQL server during query at /src/ensembl/modules/Bio/EnsEMBL/DBSQL/AnalysisAdaptor.pm line 118.<BR><BR></DIV><DIV><BR></DIV><DIV>Thanks,</DIV><DIV>Grace</DIV><DIV style="font-family:arial, helvetica, sans-serif;font-size:13pt"><BR><DIV style="font-family:arial, helvetica, sans-serif;font-size:13px"><FONT size="2" face="Tahoma"><HR size="1"><B><SPAN style="font-weight: bold;">寄件人﹕</SPAN></B> Jan-hinnerk Vogel
 <jhv@sanger.ac.uk><BR><B><SPAN style="font-weight: bold;">收件人﹕</SPAN></B> Andy Yates <ayates@ebi.ac.uk><BR><B><SPAN style="font-weight: bold;">副本(CC)</SPAN></B> Grace Cheng <himwo@yahoo.com.hk>; dev ensembl <dev@ensembl.org><BR><B><SPAN style="font-weight: bold;">傳送日期﹕</SPAN></B> 2010/8/5 (四) 6:26:35 PM<BR><B><SPAN style="font-weight: bold;">主題:</SPAN></B> Re: [ensembl-dev] Re:   Re: Re: Can't connect to ensembl database<BR></FONT><BR>hi Grace,<BR><BR>you can directly connect to the db without using the registry. The difference is that<BR>you have to specify the name of the core db you like to connect to explicitly.<BR><BR>Please find an example script attached.<BR><BR>Regards & HTH<BR><BR>   Jan Vogel<BR><BR><BR><BR><BR><BR><BR>On 5 Aug 2010, at 11:15, Andy Yates wrote:<BR><BR>> The only other thing I can think of is to change the line @ 1415 in Registry.pm to the following<BR>>
 <BR>> my $dbh =<BR>>    DBI->connect( "DBI:mysql:host=$host;port=$port", $user, $pass )<BR>>    or throw ('Cannot connect to Ensembl DB: '.$DBI::errstr);<BR>> <BR>> This must be an inability to connect to the database so the code should error if it is unable to do so. Hopefully this will provide some more useful information than the current error.<BR>> <BR>> Andy<BR>> <BR>> On 5 Aug 2010, at 11:06, Michael Schuster wrote:<BR>> <BR>>> Dear Grace,<BR>>> <BR>>> Would it be possible that you are overriding the -port in the load_registry_from_db call? The registry cannot find any Compara, ancestral or GO database and that suggests to me that you are connecting to a database instance, but not the correct one. Ensembl databases beyond release 42 are on ensembldb.ensembl.org port 5306. If you would not specify a port, then the API will connect to the correct instance depending on version
 information.<BR>>> <BR>>> Hope that helps,<BR>>> Michael<BR>>> <BR>>> <BR>>>> Hi Abel,<BR>>>> <BR>>>> Here is what I get:<BR>>>> <BR>>>> [GraceCheng@bxiew Desktop]$ DBD::mysql::db selectall_arrayref failed: fetch() without execute() at /src/ensembl/modules/Bio/EnsEMBL/Registry.pm line 1418.<BR>>>> Will only load v58 databases<BR>>>> Bio::EnsEMBL::Variation::DBSQL::DBAdaptor module not found so variation databases will be ignored if found<BR>>>> Bio::EnsEMBL::Funcgen::DBSQL::DBAdaptor module not found so functional genomics databases will be ignored if found<BR>>>> No Compara databases found<BR>>>> No ancestral database found<BR>>>> No GO database found<BR>>>> <BR>>>> Thanks,<BR>>>> Grace<BR>>>> <BR>>>> 寄件人﹕ Abel Ureta-Vidal <<A ymailto="mailto:abel@eaglegenomics.com"
 href="mailto:abel@eaglegenomics.com">abel@eaglegenomics.com</A>><BR>>>> 收件人﹕ Grace Cheng <<A ymailto="mailto:himwo@yahoo.com.hk" href="mailto:himwo@yahoo.com.hk">himwo@yahoo.com.hk</A>><BR>>>> 副本(CC) dev ensembl <<A ymailto="mailto:dev@ensembl.org" href="mailto:dev@ensembl.org">dev@ensembl.org</A>><BR>>>> 傳送日期﹕ 2010/8/5 (四) 3:11:46 AM<BR>>>> 主題: Re: [ensembl-dev] Re: Re: Can't connect to ensembl database<BR>>>> <BR>>>> What do you get with -verbose?<BR>>>> <BR>>>> Abel<BR>>>> <BR>>>> On 4 Aug 2010, at 19:49, Grace Cheng wrote:<BR>>>> <BR>>>>> Hi Abel,<BR>>>>> <BR>>>>> <BR>>>>> Thanks for your help. I get the things below:<BR>>>>> <BR>>>>> <BR>>>>> [GraceCheng@bxiew Desktop]$ grep API_VERSION
 /src/ensembl/modules/Bio/EnsEMBL/Registry.pm<BR>>>>> my $API_VERSION = 58;<BR>>>>> return $API_VERSION;<BR>>>>> if ( $database_version != $API_VERSION ) {<BR>>>>>       $API_VERSION, $database_version<BR>>>>> <BR>>>>> <BR>>>>> That mean I am in the right version, v58? I am really stuck in this point........<BR>>>>> <BR>>>>> <BR>>>>> Grace<BR>>>>> <BR>>>>> <BR>>>>> _______________________________________________<BR>>>>> Dev mailing list<BR>>>>> <A ymailto="mailto:Dev@ensembl.org" href="mailto:Dev@ensembl.org">Dev@ensembl.org</A><BR>>>>> <A href="http://lists.ensembl.org/mailman/listinfo/dev" target="_blank">http://lists.ensembl.org/mailman/listinfo/dev</A><BR>>>> <BR>>>> __<BR>>>> Abel Ureta-Vidal<BR>>>> Eagle Genomics Ltd | E:
 <A ymailto="mailto:abel@eaglegenomics.com" href="mailto:abel@eaglegenomics.com">abel@eaglegenomics.com</A><BR>>>> <A href="http://www.eaglegenomics.com" target="_blank">http://www.eaglegenomics.com</A><BR>>>> <BR>>>> <BR>>>> _______________________________________________<BR>>>> Dev mailing list<BR>>>> <A ymailto="mailto:Dev@ensembl.org" href="mailto:Dev@ensembl.org">Dev@ensembl.org</A><BR>>>> <A href="http://lists.ensembl.org/mailman/listinfo/dev" target="_blank">http://lists.ensembl.org/mailman/listinfo/dev</A><BR>>> <BR>>> --<BR>>> Michael Schuster<BR>>> Ensembl Genome Browser<BR>>> EMBL - European Bioinformatics Institute<BR>>> Wellcome Trust Genome Campus<BR>>> Hinxton, Cambridgeshire CB10 1SD<BR>>> United Kingdom<BR>>> <BR>>> Tel: +44-1223-494462<BR>>> FAX: +44-1223-494468<BR>>> URL: <A
 href="http://www.ensembl.org/" target="_blank">http://www.ensembl.org/</A><BR>>> <BR>>> <BR>>> <BR>>> _______________________________________________<BR>>> Dev mailing list<BR>>> <A ymailto="mailto:Dev@ensembl.org" href="mailto:Dev@ensembl.org">Dev@ensembl.org</A><BR>>> <A href="http://lists.ensembl.org/mailman/listinfo/dev" target="_blank">http://lists.ensembl.org/mailman/listinfo/dev</A><BR>> <BR>> --Andrew Yates                   Ensembl Genomes Engineer<BR>> EMBL-EBI                       Tel: +44-(0)1223-492538<BR>> Wellcome Trust Genome Campus   Fax: +44-(0)1223-494468<BR>> Cambridge CB10 1SD, UK         <A href="http://www.ensemblgenomes.org/" target="_blank">http://www.ensemblgenomes.org/</A><BR>> <BR>> <BR>> <BR>> <BR>> <BR>> _______________________________________________<BR>> Dev mailing list<BR>> <A ymailto="mailto:Dev@ensembl.org"
 href="mailto:Dev@ensembl.org">Dev@ensembl.org</A><BR>> <A href="http://lists.ensembl.org/mailman/listinfo/dev" target="_blank">http://lists.ensembl.org/mailman/listinfo/dev</A><BR><BR></DIV></DIV>


</div><br>





       </body></html>