Use Drush to Import/Export MySQL database file

Export Database to file

Drupal 6 & 7

    drush cc
    drush sql-dump > ~/my-sql-dump-file-name.sql

Drupal 8

    drush cr
    drush sql-dump > ~/my-sql-dump-file-name.sql

Download Database using ssh and secure copy scp

    scp username@server-address.com:/file_path_remote/file_name.sql /local_path/

Import Database

    drush sql-drop
    drush sql-cli < ~/my-sql-dump-file-name.sql