Here is how you can backup your Drupal's MySQL database from a terminal:
mysqldump -u my_drupal_mysql_user_name -p my_drupal_mysql_database_name > ~/my_drupal_sql_dump.sql
I like to clear all Drupal caches before running the dump so that there is not a lot of cache data in the export, and therefore it is a clean export that weighs as little as possible.
If you prefer to use Drush, see this article instead: Use Drush to export/import a Drupal MySQL database dump file