Database Backup Recovery Knowledge Essentials:
Timeline Backup Type classification:Full backup : Backing up the entire data setIncremental backup : Backup of the last full backup, or data that changed after the last incremental backup (Restore
Mysqldump used in MySQL database logical backup1. Various usage instructionsA. The simplest usage:[database name[dump file] The above command backs up the specified database to a dump file (dump file), such as:> Test. DumpThe generated Test.dump
Error in mysqldump and error in mysqldump
When you use the mysqldump command to back up the entire database, the following error is returned:
Mysqldump: Couldn't execute 'show triggers like 'userlog'': Got error 28 from storage engine (1030)
View
Mysqldump is a utility that MySQL uses to store databases. It primarily produces a SQL script that contains the commands necessary to recreate the database from scratch, create TABLE insert, and so on.Let's look at the various examples of mysqldump
MySQL has many data import methods, but these are only half of the data transmission, and the other is generally exporting data from the MySQL database. There are many reasons for exporting data. One important reason is that it is used to back up
Mysqldump
Mysql provides the msyqldump tool to export the database.
After searching for articles on the Internet, most of them are from one article, with a wide range of contents. Most of them are not used.
I sorted out some of the options I used
Mysqldump is a common mysql database tool. We often use it for data and backup, for example, data import and export. This article introduces the code for exporting the most basic database and exporting tables.]
# Mysqldump Database Name> Database
Use mysqldump to export databases.
First, I met a database named mydb,
There are two tables, mytable and mytabletwo.
Both tables have data.
C: \ Program Files \ mysql \ MySQL Server 5.1 \ bin> mysqldump-uroot-proot-D mydb> C:/KUjiegou. SQL//
Mysqldump Backup Instructions:#mysqldump-uroot-p123456 Test > Test.sql #mysqldump-uroot-p123456-b Test > Test.sql #这两个的差别:-B database to be created Name will also be backed up #mysqldump-uroot-p123456-b test | gzip > test.sql.gz Backup Library and
In the previous article "mysql--when mysqldump--single-transaction encountered alter TABLE" Test found that in the MySQL 5.6 version, if the table was modified during mysqldump, may result in mysqldump error, This conclusion is inconsistent with
Back up database
# Mysqldump Database Name> Database Backup name
# Mysqldump-a-u username-P Password Database Name> Database Backup name
# Mysqldump-D-A -- add-drop-table-uroot-P> XXX. SQL
1. the exported structure does not export data
several common methods of 1.mysqldump:(1) Export the entire database (including data in the database)Mysqldump-u username-p dbname > Dbname.sql (2) Export database structure (without data)Mysqldump-u username-p-D dbname > Dbname.sql (3) Export
Mysqldump is commonly used in MySQL database logical backups.1. Various usage instructionsA. The simplest usage:Mysqldump-uroot-ppassword [database name] > [dump file]The above command backs up the specified database to a dump file (dump file), such
For MySQL backup, it can be divided into the following two kinds:1. Cold Standby2. Hot standbyAmong them, cold, as the name implies, is to turn off the database, using operating system commands to copy database related files. The hot standby refers
In MySQLDump, use the-w statement for backup. mysqldump-w
When we use mysqldump to back up data, we have the option-where/-w. You can specify the backup conditions. The options are described as follows:
-w, --where=name Dump only selected records.
MySQL mysqldump Export only table structure does not export dataCopy CodeThe code is as follows:Mysqldump--opt-d database name-u root-p > Xxx.sqlbacking up the databaseCopy CodeThe code is as follows:#mysqldump database name > Database backup
Mysqldump parameter Description--all-databases,-AExport all databases.Mysqldump-uroot-p--all-databases--all-tablespaces, YExport all table spaces.Mysqldump-uroot-p--all-databases--all-tablespaces--no-tablespaces, YNo table space information is
MySQL has many data import methods, but these are only half of the data transmission, and the other is generally exporting data from the MySQL database. There are many reasons for exporting data. One important reason is that it is used to back up
MySQL mysqldump is used for export. The basic usage is as follows:Shell> mysqldump [OPTIONS] database [tables]If you do not specify any tables, the entire database will be exported.Run mysqldump -- help to obtain the option table supported by your
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.