Simple Mysql Database Dump Backup File on Ubuntu
Just log into your terminal and type the below command$ cd ~
$ mysqldump -u yourusername -p –all-databases > mysql.backup
cd ~ simply changes directory to your home directory, where user can have all the necessary permissions to create a file mysql.backup
Replace the yourusername with the Mysql database username
The –all-databases flag will dump all the databases in MySQL to the file mysql.backup
To make a targeted database backup Dump file is
$ cd ~
$ mysqldump -u yourusername -p NameOfDatabase > mysql.backup
Replace NameOfDatabase by the Specific database name
This command will then dump all the contents, including the structure of the database into mysql.backup
