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


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.

Updated on: 07-Feb-2020

145 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements