Learn How to Do-It-Yourself!

How To Create a mysqldump File

Back up your MySQL database with the mysqldump utility on a Windows machine.

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.


_______________________________________
Save this  Email this  |  Digg this!  |  del.icio.us  |  RSS 

Related Articles


1 Comment

MySQLDump.exe by Girl Dude on 10/31/2008
How to create the backup without mysql installed ???

Add your comment

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

Title:  

Comment:  
Join now for free to keep track of all your comments and have them appear instantly.

Sponsored Links

Search for keywords: