Home > Database > Mysql Tutorial > body text

mysqlpump - MySQL database backup program

王林
Release: 2023-09-20 11:29:02
forward
1178 people have browsed it

mysqlpump - MySQL 数据库备份程序

#The mysqlpump client utility performs a logical backup, thereby generating a set of SQL statements that can be executed to reproduce the original database object definitions and table data. It helps in dumping one or more MySQL databases for backup or transfer to another SQL server.

Function of mysqlpump

Let us understand the function of mysqlpump-

  • Parallel processing of the database and the objects in the database, thus helping to speed up the dump process.

  • It provides better control over which databases and database objects (tables, stored procedures, user accounts) need to be dumped

  • Will user accounts be dumped Dumped into account management statements (CREATE USER, GRANT) Instead of inserting into the mysql system database as

  • it has the ability to create compressed output.

  • This is an indicator that provides an estimate of progress.

  • For dump file reloading, it can speed up the creation of secondary indexes for InnoDB tables by adding indexes after rows are inserted.

    >

Syntax - Calling mysqldump

By default, mysqlpump dumps all databases. To specify this behavior explicitly, use the --all-databases option. As shown below -

shell> mysqlpump --all-databases
Copy after login

To dump a single database or a specific table in a database, the database name must be specified on the command line, followed by the table name. As shown below -

shell> mysqlpump db_name
shell> mysqlpump db_name tbl_name1 tbl_name2 ...
Copy after login

To treat all name parameters as database names, you can use the --databases option. As shown below -

shell> mysqlpump --databases db_name1 db_name2 ...
Copy after login

mysqlpump utility supports multiple options to include or exclude databases, tables, stored procedures and user definitions. To reload the dump file, the statements contained within need to be executed. The example below shows the same -

shell> mysqlpump [options] > dump.sql
shell> mysql < dump.sql
Copy after login

The above is the detailed content of mysqlpump - MySQL database backup program. For more information, please follow other related articles on the PHP Chinese website!

source:tutorialspoint.com
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!