Backing up frequently can help prevent the loss of valuable data, and another reason is that you might want to export the data to share. In this growing world of information technology, shared data is becoming more common.For example, Macmillan USA
Parameters
Parameter description
--all-databases,-A
Export all databases.
Mysqldump-uroot-p--all-databases
--all-tablespaces, Y
Export all table spaces.
Mysqldump-uroot-p--all-databases--all-tablespaces
--no-tablespaces, Y
does not export
ParametersParameter 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
Some production environments use mysqldump--single-transaction to perform database backups at night, while colleagues perform the ALTER TABLE operation during backup, and the part of the operation fails partially successfully, why?The interpretation
mysqldump is a tool used by the database for backup and data transfer, which can be used for backup when the amount of data is small (several grams). When the amount of data is relatively large, it is not recommended to use the Mysqldump tool for
There are many methods to back up data in mysql. The most common method is mysqldump. Another method is to directly copy the database for backup. Let's take a look at it.
1. mysqldump backup method
This seems to be the simplest backup method except
Using mysqldump in linux to back up a mysql database as an SQL FilePhase 1: Completely backup mysqldump-h IP address-uusername-ppassword-A> ~ /Name. SQL in this case, the entire database (structure and data) is exported and backed up into an SQL
MySQL backup solution-amp; gt; (using mysqldump and binlog binary logs) mysqldump
BitsCN.com
MySQL backup solution --> (using mysqldump and binlog binary logs)
As data increases and the innodb storage engine is compatible with the future, the
Mydumper and mysqldump in mysql are compared and used, and mydumpermysqldump
If you only back up several tables or a single database, mysqldump and mydumper are more convenient than innobackup. However, mydumper adds many features, such as
MySQL mysqldump only export table structure do not export data
Copy Code code as follows:
Mysqldump--opt-d database name-u root-p > Xxx.sql
backing up a database
Copy Code code as follows:
#mysqldump database
#mysqldump database name > Database backup Name#mysqldump-A-u user name-p password database name > database backup Name#mysqldump-D-A--add-drop-table-uroot-p >xxx.sql
Export the entire database
The code is as follows
Copy Code
1. 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 file contains the Build Table statement (the
At the command line MySQL data export has a very good command mysqldump, it has a lot of parameters, you can view:MysqldumpMost commonly used:Mysqldump-uroot-pmysql databasefoo table1 table2 > Foo.sqlThis allows the database Databasefoo table Table1,
Mysqldump is a MySQL-brought export data tool that we usually use to export MySQL, but sometimes we need to export some of the data from a table in a MySQL database.The mysqldump command has a--where/-w parameter that sets the criteria for data
For more information, see mysqldump data export.
1. An error (1064) is reported when mysqldump is used. This is because the version of mysqldump is too low and is inconsistent with the current database version.
Mysqldump: Couldn't execute 'set
1. mysqldump-A database backup program
Mysqldump [Options] [db_name [tbl_name...]
If you do not specify any tables, the entire database will be exported.
2. Option [2]
-- Opt optimizes the table's dump speed and writes the dump file, which is
How to Use mysqldump to back up MySQL Data,
MySQL's mysqldump tool supports single-threaded operations. Multiple tables are exported one by one without a parallel machine, which makes it unable to quickly back up data.
Mydumper is a utility that
Mysql mysqldump only exports the table structure and does not export data
Copy codeThe Code is as follows: mysqldump -- opt-d database name-u root-p> xxx. SQL
Back up databaseCopy codeThe Code is as follows: # mysqldump Database Name> Database
We can use mysqldump to back up various objects in the database. The basic usage is as follows:
Shell>Mysqldump [Options] database [Tables]* If you do not specify any tables, the entire database will be exported.
Mysqldump supports the following
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.