MySQL backup tutorial


Home - Tutorials - MySQL

In this tutorial I will show you a short and simple way how to create a backup copy of your MySQL database using the mysqldump utility.

Tutorial info:


Name:MySQL backup tutorial
Total steps:2
Category:MySQL
Date:2008-11-03
Level:Beginner
Product:See complete product
Viewed:19903

Bookmark MySQL backup tutorial



AddThis Social Bookmark Button

Step 1 - MySQL backup with mysqldump


MySQL backup tutorial

I don't want to collect all of the reasons why a backup is important. If you are reading this page you probably know them.

MySQL backup solutions:

There are many ways how you can create a backup with MySQL. Here is a list of the most important backup groups:

Besides this the backup possibilities depend on what kind of database engine you use. In this tutorial I only demonstarte mysqldump as it is more general than the others and can backup all kind of tables.

Using mysqldump to backup your data:

First of all you have to check if the MySQL bin directory is in your PATH or not. Simply try to execute the mysqldump command. If the file was not found then you can extend your PATH or switch to the MySQL bin directory. For example on my Windows machine it is: D:\Program Files\MySQL\MySQL Server 5.0\bin\

Mysqldump creates an sql file as the result of the backup. Later you simply can execute this file to recreate the MySQL database.

You can backup only some tables, the complete database or all available databases depending on how you call mysqldump. The most simple way to backup a single MySQL database is the following:

Code:
  1. mysqldump -r c:\backup\myDb.sql myDb

This code generates the backup of the myDb database in the c:\backup directory.




Next Step of MySQL backup tutorial


Tags: mysql backup tutorial, mysql backup mysqldump, mysql backup, mysqldump backup, mysql, backup

MySQL backup tutorial - Table of contents
Step 1 - MySQL backup with mysqldump
Step 2 - More mysqldump usage examples



F1 Site Family
AJAX F1
CSS F1
Database F1
Flash F1
HTML F1
Java F1
JavaScript F1
PhotoShop F1
PHP F1
Scripts F1
Tutorial F1
Windows F1

Family tutorials
PHP Array
PHP Redirect
PHP Session
JavaScript String
JavaScript Timeout
JavaScript Tooltip
AJAX PHP
AJAX File Upload
AJAX Rating System

Total time: 0.0332