Grammar:
1. mysqldump [Options]-all-databases
2. mysqldump [Options]--databases database [Database ...]
3. mysqldump [Options] database [table]
Mysqldump can export data and table structures in MySQL. You can typically use the utility to back up a database or to copy a database from one server to another. You can execute the tool on a server that is in a running state. To maintain the consistency of data between tables, you need to locking the table (see--lock-tables option) or close the mysqld background.
The tool has three grammatical forms. The first syntax is used to back up all databases on the server. The second syntax is used to back up all tables in the specified database. The third syntax is used to back up the specified table for the specified database.
A sample of the first syntax is given below to back up all databases on the server.
Mysqldump--host=russell.dyerhouse.com--user=russell--password--lock-tables--all-databases >/tmp/workreque Sts.sql
MySQL Export database command: mysqldump