In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-09 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
Usage: mysqldump [OPTIONS] database [tables]
OR mysqldump [OPTIONS]-databases [OPTIONS] DB1 [DB2 DB3 …]
OR mysqldump [OPTIONS]-all-databases [OPTIONS]
You can use mysqldump-help to view all command help
The most commonly used parameter description: 1.-- all-databases,-A: export all databases, including mysql, informance_schema, performance_schema Database example: mysqldump-u root-ppassword-P3306-S / tmp/mysql.sock-- all-databases > all.sql or: mysqldump-u root-ppassword-P3306-S / tmp/mysql.sock-A > all.sql2.--no-data,-d: export the table structure of all databases. Data examples are not included: mysqldump-u root-ppassword-P3306-S / tmp/mysql.sock-- no-data-- all-databases > 1.sql or mysqldump-u root-ppassword-P3306-S / tmp/mysql.sock-d-A > 1.sql3.--databases -B export data examples of a database: mysqldump-u root-ppassword-P3306-S / tmp/mysql.sock-- databases testdatabase > 1.sql or: mysqldump-u root-ppassword-P3306-S / tmp/mysql.sock-B testdatabase > 1.sql4.--add-drop-database: add drop database statements before each database is created. Use this option with caution. This option is turned off by default because the existing database is overwritten when you re-import the database. 5.--add-drop-table add drop data table statements before each data table is created, default is on, use-- skip-add-drop-table to disable this function example: cancel adding drop table statement: mysqldump-u root-ppassword-P3306-S / tmp/mysql.sock-- skip-add-drop-table-- all-databases > all.sql6.--master-data export with master_log_file and master_log_pos information Example used when initializing slave: mysqldump-u root-ppassword-P3306-S / tmp/mysql.sock-- master-data-- all-databases > all.sql7.--single-transactionInnoDB Table when backing up, enable the option-- single-transaction to ensure the consistency of the backup. It works by setting the isolation level of this session to REPEATABLE READ to ensure that when backing up this session, you will not see the data that has been submitted by other sessions. At the same time, the time to add global read lock is very short, which can be understood as hot backup, so it is strongly recommended to add the-- single-transaction parameter when using the mysqldump parameter for backup.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.