EnsemblEnsembl Home

The Ensembl public MySQL Servers

For large amounts of data and more detailed analysis, we recommend you use one of our publicly-accessible MySQL servers ensembldb.ensembl.org, useastdb.ensembl.org or asiadb.ensembl.org which you can access as user 'anonymous'. A third server, martdb.ensembl.org provides public access to the BioMart databases. If you are interested in data on the human GRCh37 assembly this is available at ensembldb.ensembl.org only (see below for connection details).

There are two options for retrieving data from the Ensembl databases:

Perl API

The easiest option is to use the Ensembl Perl API. The API uses an object-oriented approach to model real biological objects such as genes, transcripts and 'slices' of DNA sequence, making it straightforward for you to write scripts that retrieve and analyze data.

# find gene stable ids corresponding to the MGI symbol 'Tyr' my
$gene_adaptor = $dbCore->get_GeneAdaptor(); my @genes = @{
$gene_adaptor->fetch_all_by_external_name('Tyr') };

Additional code examples and suggestions can be found in the various API tutorials and the ensembl-dev mailing list archives.

MySQL client

Alternatively, you can use a MySQL client program to query the database directly. However this does require knowledge of the complex database schemas used by Ensembl, so we only recommend it if you are unable to install our API (e.g. if you have no access to Perl). Also note that direct MySQL queries on the database are not suited to retrieve sequences; to retrieve sequences please use the Perl API.

Biomart

For BioMart access, we strongly recommend that you use the martview web interface, as the mart databases contain very many tables of denormalised data. Data can also be retrieved from BioMart programmatically, using the Mart XML-based webservice.

Summary of servers and ports

Important note: Because we are serving databases on both MySQL4 and MySQL5, not all MySQL instances use the default port; please ensure that you specify the correct port when trying to connect. In addition, if your computer is behind a firewall, outgoing TCP/IP connections to the corresponding ports need to be allowed, too. Otherwise connections will not be established.

Server User Password Port Notes
ensembldb.ensembl.org anonymous - 3306 & 5306 From Ensembl 48 onwards only
useastdb.ensembl.org anonymous - 3306 & 5306 Current and previous Ensembl version only
asiadb.ensembl.org anonymous - 3306 & 5306 Current and previous Ensembl version only
martdb.ensembl.org anonymous - 5316 From Ensembl 48 onwards only
ensembldb.ensembl.org anonymous - 3337 Databases for archive GRCh37 - current and previous schema only
ensembldb.ensembl.org anonymous - 4306 Up to Ensembl 47 only
martdb.ensembl.org anonymous - 3316 Up to Ensembl 47 only