How To Create a mysqldump File

Back up your MySQL database with the mysqldump utility on a Windows machine.
by Updated January 29, 2009

MySQL has several ways to create backups of important data. In this article, I will show you how to create a backup of your MySQL database on a Windows machine using the mysqldump utility that is included with MySQL.

  1. Bring up the Command Prompt  (from Start > All Programs > Accessories > Command Prompt)
  2. Now change the directory to where mysqldump.exe is located. To do this type the following if you using MySQL 5.0cd C:\Program Files\MySQL\MySQL Server 5.0\bin
  3. Then hit Enter.
  4. Now type the following command: mysqldump -u root --password=yourpassword databasename > c:/databasename.sql       
  5. Now go to the c: drive and locate the sql script file that you just created. Keep in mind, that if your database is large, it may take a while to complete the backup.

Example of Step 4 explained: 

mysqldump -u admin --password=mypass123 bigdaddy > c:/bigdaddy.sql

The line above is instructing mysql to use the Username: admin with the Password: mypass123 to log into the database named: bigdaddy, and create the mysqldump file in the c:/ directory with the name: bigdaddy.sql 

* Note make sure there isn't already a SQL file by the same name in the directory you are dumping the file to.




anonymous by Girl Dude on 10/18/2008
How to create the backup without mysql installed ???
anonymous by jak on 12/3/2008
it is clean and great...
iam awesome..

Thanks.. Jak

Add your comment

by Anonymous - Already have an account? Login now!
Your Name:  

Enter the text you see in the image below
What do you see?
Can't read the image? View a new one.
Your comment will appear after being approved.

Related Posts

This step-by-step goes through the process of importing delimited text files into a SQL Server 2005 database. The example should help you better understand how to import different types of flat files into SQL Server 2005.  more »

This tutorial goes through the steps of how to import a SQL script file into a MySQL database.  more »