How to Backup and Restore MySQL Database using mysqldump

Backup and  Restore of MySql database using command line arguments involves simple steps using mysqldump and we will learn about few MySql utility commands in this tutorial.


In the Previous article we seen about  Installation of MySql Server in Linux  as well as common simple queries, next will see about Backup & Restoration using command line arguments.

How to Backup MySQL Database:-

The command or utility for MySql database backup is mysqldump . This command creates dump in text/sql format of the particular database.

First, we will list out all the databases which is available in the instance or server,

# mysql -u root -p 
#> show databases;

Below command will take backup of single database,

# mysqldump database_Name > database_Name.sql;

To take multiple databases backup,

# mysqldump --databases database_Name_1 database_Name_2 > database_NameS.sql;

Also we can take entire databases to be backup in the mysql server using this command,

# mysqldump --all-databases > database_NameS_ALL.sql;

To backup of specific tables from a database,

# mysqldump database_Name_1 Table_1 > TableName.sql;

Continue Reading on Restoration of MySQL database steps & processes,


  • JillYOpoka

    March 7, 2016

    Hey very interesting blog!

  • KareemZRolek

    March 7, 2016

    We have been a group of volunteers and starting a fresh scheme inside our community.
    Your site offered us with valuable info to work on. You possess
    done a formidable job and our whole community will probably be thankful to you personally.

Leave a Reply