How to create a mysql backup from command line Print

  • 1

MySQL provides a great command line utility to take backups of your MySQL database. mysqldump command line utility is available with MySQL installation (bin directory) and can be used to achieve this.

  1. Login to your server with root user

  2. Use following command for taking backup of your MySQL database using mysqldump utility.

mysqldump –u[user name] –p[password] [database name] > [dump file]

  1. Now to make sure the command was executed and the backup file was created use the command

ls –l

on the same path and you should see the database backup file.


Was this answer helpful?

« Back