How about backing up all the databases in the server? That’s an easy one, just use the –all-databases parameter to backup all the databases in the server in one step.

mysqldump –all-databases> alldatabases.sql

How to Backing up only the Database Structure in MySQL
You can backup only the database structure by telling mysqldump not to back up the data. You can do this by using the –no-data parameter when you call mysqldump.

mysqldump –no-data –databases Customers Orders Comments > structurebackup.sql