mysqldump lets you quickly and efficiently take a backup of a single database, multiple databases, or even all of the databases on your server. This requires shell access to the server you wish to perform the commands on and the MySQL login credentials for your user(s).
The filepath for your database (.sql) backup will be your current working directory. You may use an absolute path as well, such as /root/exampledbdump.sql
Backing Up Multiple Databases
If you wish to backup two or more databases, you'll need to specify –databases followed by the names of the databases you want to backup. Remember that the database user must have privileges to access the database that is being backed up.
mysqldump -u user -p[user_pass] –databases [database_name] [database_name] [database_name] > dumpfile.sql