How to create mysql database backup from command line

You  can create database backup by typing following commands from command line.

Go to run dialog by pressing Window + R keys at the same time.

Type following command and press Enter key.

mysqldump -u <database username> -p <database name> > database_backup_file_name.sql

This command will ask you to enter database password. Enter password and press Enter key.

Your database backup will be saved in your current directory with database_backup_file_name.sql name.

That’s it!




Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s