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 such as:

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

Databases prior to release 48: The MySQL version 4 servers providing access to databases from release 47 and earlier have retired. The files are still available from our FTP site and can be hosted locally using a Docker container we provide. See our blog post for more details.

Not all of our MySQL instances use the default port so 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 will also need to be allowed.

The useastdb and asiadb mirrors use MariaDB rather than MySQL. For all practical purposes these are identical.

Server User Password Port(s) Version Notes
ensembldb.ensembl.org anonymous - 3306 & 5306 MySQL 5.6.33 From Ensembl 48 onwards only
useastdb.ensembl.org anonymous - 3306 & 5306 MariaDB 10.0.30 Current and previous Ensembl version only
asiadb.ensembl.org anonymous - 3306 & 5306 MariaDB 10.0.30 Current and previous Ensembl version only
martdb.ensembl.org anonymous - 5316 MariaDB 10.0.30 From Ensembl 48 onwards only
ensembldb.ensembl.org anonymous - 3337 MySQl 5.6.33 Databases for archive GRCh37 - release 79 onwards