Rechercher dans le manuel MySQL
7.4 Using mysqldump for Backups
[+/-]
This section describes how to use mysqldump to produce dump files, and how to reload dump files. A dump file can be used in several ways:
As a backup to enable data recovery in case of data loss.
As a source of data for setting up replication slaves.
As a source of data for experimentation:
To make a copy of a database that you can use without changing the original data.
To test potential upgrade incompatibilities.
mysqldump produces two types of output,
depending on whether the --tab
option is given:
Without
--tab
, mysqldump writes SQL statements to the standard output. This output consists ofCREATE
statements to create dumped objects (databases, tables, stored routines, and so forth), andINSERT
statements to load data into tables. The output can be saved in a file and reloaded later using mysql to recreate the dumped objects. Options are available to modify the format of the SQL statements, and to control which objects are dumped.With
--tab
, mysqldump produces two output files for each dumped table. The server writes one file as tab-delimited text, one line per table row. This file is named
in the output directory. The server also sends atbl_name
.txtCREATE TABLE
statement for the table to mysqldump, which writes it as a file named
in the output directory.tbl_name
.sql
Document created the 26/06/2006, last modified the 26/10/2018
Source of the printed document:https://www.gaudry.be/en/mysql-rf-using-mysqldump.html
The infobrol is a personal site whose content is my sole responsibility. The text is available under CreativeCommons license (BY-NC-SA). More info on the terms of use and the author.
References
These references and links indicate documents consulted during the writing of this page, or which may provide additional information, but the authors of these sources can not be held responsible for the content of this page.
The author This site is solely responsible for the way in which the various concepts, and the freedoms that are taken with the reference works, are presented here. Remember that you must cross multiple source information to reduce the risk of errors.