How can we take a backup of all the databases by using mysqldump client program?

MySQLMySQLi Database

By using mysql dump client program we can take the backup of all the databases into a file having the extension ‘.sql’. It can be understood with the help of the following example −

Example

In this example, with the help of mysql dump client program, we are taking the backup all the databases in a file named ‘alldatabases.sql’. The following command will do this −

C:\mysql\bin>mysqldump -u root --all-databases > alldatabases.sql

The above command will create a file named alldatabases.sql which has the dump information of all the databases.

raja
Published on 20-Feb-2018 10:25:21
Advertisements