nordvpn

How to Backup MySQL database command line

backup mysql database

Creating MySQL Backup

In this tutorial in will show you how to backup mysql database.

The mysqldump command is used to create textfile “dumps” of databases managed by MySQL. These dumps are just files with all the SQL commands needed to recreate the database from scratch. The process is very quick and easy.

Read Also: How to install mariadb on centos?

If you want to create backup of one database or single database, execute the following command:

mysqldump -u username -p databasename > backup.sql

If you want take backup of multiple databases execute following command:
mysqldump -u username -p database1 database2 > backup.sql

If you want to take backup of all databases use:

mysqldump -u username -p --all-databases > fullbackup.sql

Read Also: How to create mysql database and tables?

Read Also: Restoring mysql database

If you have any issue using this tutorial Please feel free to Comment below.

Read Also: Create mysql user from command line

Leave a Reply

Your email address will not be published.


*



The reCAPTCHA verification period has expired. Please reload the page.

48-Hour Flash Sale! Courses from just $10.99