Drush has the ability to use site aliases. Site aliases are configuration items that allow you to interact with a remote Drupal site. In this recipe, we will use the following alias to interact with a fictional remote site to show how a typical workflow will go to fetch a remote database.
Note that you do not need to use a Drush alias to download the database dump created in the recipe; you can use any method you are familiar with (manually from the command line with mysqldump or phpMyAdmin):
$aliases['drupal.production'] = [
'uri' => 'example.com',
'remote-host' => 'example.com',
'remote-user' => 'someuser',
'ssh-options' => '-p 2222',
];
Read the Drush documentation for more information on site aliases at http://docs.drush.org/en/master/usage/#site-aliases. Site aliases allow you to interact with remote Drupal installations.
We will also assume that the local development site has not yet been configured to connect it to the database.