USING SSH MYSQL DUMP and backup databases. OR Downloading MySQL dump from command line.
You can accomplish this using the mysqldump command-line function.
If it’s an entire DB, then:
If it’s all DBs, then:
If it’s specific tables within a DB, then:
You can even go as far as auto-compressing the output using gzip (if your DB is very big):
If you want to do this remotely and you have the access to the server in question, then the following would work (presuming the MySQL server is on port 3306):