[ensembl-dev] Re: Re: Re: Can't connect to ensembl database

Jan-hinnerk Vogel jhv at sanger.ac.uk
Thu Aug 5 11:26:35 BST 2010


hi Grace,

you can directly connect to the db without using the registry. The  
difference is that
you have to specify the name of the core db you like to connect to  
explicitly.

Please find an example script attached.

Regards & HTH

    Jan Vogel


-------------- next part --------------
A non-text attachment was scrubbed...
Name: for_grace.pl.gz
Type: application/x-gzip
Size: 662 bytes
Desc: not available
URL: <http://mail.ensembl.org/pipermail/dev_ensembl.org/attachments/20100805/5fd04131/attachment.bin>
-------------- next part --------------




On 5 Aug 2010, at 11:15, Andy Yates wrote:

> The only other thing I can think of is to change the line @ 1415 in  
> Registry.pm to the following
>
> my $dbh =
>    DBI->connect( "DBI:mysql:host=$host;port=$port", $user, $pass )
>    or throw ('Cannot connect to Ensembl DB: '.$DBI::errstr);
>
> 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.
>
> Andy
>
> On 5 Aug 2010, at 11:06, Michael Schuster wrote:
>
>> Dear Grace,
>>
>> 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.
>>
>> Hope that helps,
>> Michael
>>
>>
>>> Hi Abel,
>>>
>>> Here is what I get:
>>>
>>> [GraceCheng at bxiew Desktop]$ DBD::mysql::db selectall_arrayref  
>>> failed: fetch() without execute() at /src/ensembl/modules/Bio/ 
>>> EnsEMBL/Registry.pm line 1418.
>>> Will only load v58 databases
>>> Bio::EnsEMBL::Variation::DBSQL::DBAdaptor module not found so  
>>> variation databases will be ignored if found
>>> Bio::EnsEMBL::Funcgen::DBSQL::DBAdaptor module not found so  
>>> functional genomics databases will be ignored if found
>>> No Compara databases found
>>> No ancestral database found
>>> No GO database found
>>>
>>> Thanks,
>>> Grace
>>>
>>> ???? Abel Ureta-Vidal <abel at eaglegenomics.com>
>>> ???? Grace Cheng <himwo at yahoo.com.hk>
>>> ??(CC) dev ensembl <dev at ensembl.org>
>>> ????? 2010/8/5 (?) 3:11:46 AM
>>> ??? Re: [ensembl-dev] Re? Re? Can't connect to ensembl  
>>> database
>>>
>>> What do you get with -verbose?
>>>
>>> Abel
>>>
>>> On 4 Aug 2010, at 19:49, Grace Cheng wrote:
>>>
>>>> Hi Abel,
>>>>
>>>>
>>>> Thanks for your help. I get the things below:
>>>>
>>>>
>>>> [GraceCheng at bxiew Desktop]$ grep API_VERSION /src/ensembl/modules/ 
>>>> Bio/EnsEMBL/Registry.pm
>>>> my $API_VERSION = 58;
>>>> return $API_VERSION;
>>>> if ( $database_version != $API_VERSION ) {
>>>>       $API_VERSION, $database_version
>>>>
>>>>
>>>> That mean I am in the right version, v58? I am really stuck in  
>>>> this point........
>>>>
>>>>
>>>> Grace
>>>>
>>>>
>>>> _______________________________________________
>>>> Dev mailing list
>>>> Dev at ensembl.org
>>>> http://lists.ensembl.org/mailman/listinfo/dev
>>>
>>> __
>>> Abel Ureta-Vidal
>>> Eagle Genomics Ltd | E: abel at eaglegenomics.com
>>> http://www.eaglegenomics.com
>>>
>>>
>>> _______________________________________________
>>> Dev mailing list
>>> Dev at ensembl.org
>>> http://lists.ensembl.org/mailman/listinfo/dev
>>
>> --
>> Michael Schuster
>> Ensembl Genome Browser
>> EMBL - European Bioinformatics Institute
>> Wellcome Trust Genome Campus
>> Hinxton, Cambridgeshire CB10 1SD
>> United Kingdom
>>
>> Tel: +44-1223-494462
>> FAX: +44-1223-494468
>> URL: http://www.ensembl.org/
>>
>>
>>
>> _______________________________________________
>> Dev mailing list
>> Dev at ensembl.org
>> http://lists.ensembl.org/mailman/listinfo/dev
>
> -- 
> Andrew Yates                   Ensembl Genomes Engineer
> EMBL-EBI                       Tel: +44-(0)1223-492538
> Wellcome Trust Genome Campus   Fax: +44-(0)1223-494468
> Cambridge CB10 1SD, UK         http://www.ensemblgenomes.org/
>
>
>
>
>
> _______________________________________________
> Dev mailing list
> Dev at ensembl.org
> http://lists.ensembl.org/mailman/listinfo/dev

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2063 bytes
Desc: not available
URL: <http://mail.ensembl.org/pipermail/dev_ensembl.org/attachments/20100805/5fd04131/attachment.p7s>


More information about the Dev mailing list