Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Mysql backup tool for my Mysql Learning Notes: mydqldump

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/02 Report--

The backup tool that comes with mysqldump:mysql is a logical backup tool that reads data from the database and converts it into the corresponding sql statement.

Full backup or partial backup can be achieved, hot backup can be achieved for tables using innodb database engine, and warm backup can only be achieved for tables using mysisam database engine.

Suitable for database backup with small amount of data, unable to back up index and other information, when the data is floating-point type, the precision will be lost, and the backup process is serial.

Mysqldump

-- user= specifies which account to interact with the MySQL server

-- password interactively enter passwords

-- password=xxx non-interactive password entry (for use in scripts)

-Amam: back up all tables in all databases

-Ymam MustallMueller tablespaces: back up all tablespaces

-ymam Murray Murray tablespaces: do not back up tablespaces

-Bjinmei: specify the database to be backed up. Multiple databases can be specified at the same time, separated by spaces.

-- tables if you want to back up multiple tables in the same database, simply list the tables in a space-separated manner after-- tables

-Cremlin Mutual compress: compressed transmission

-xmam: lock all tables

-lmam: lock the backed-up table

-Fmam, Flemish, flush. logs: execute the flush logs command after locking the table

-d: only backup table structure, no table data

-- master-data: marks the position (location) corresponding to the binlog at the beginning of the backup

-- master-data=0 # does not record the corresponding binary file location

-- master-data=1 # record the corresponding binary log file location

-- master-data=2 #

-triggers: stored procedures and stored functions are also backed up when backing up-- triggers are backed up when backing up. Indicates that the event table will be backed up during backup-skip-add-drop-table without DROP TABLE statement, neither delete the original table on restore-skip-add-locks without lock table statement-skip-comments without comment-skip-disable-keys without statement to invalidate the index in the table-skip-set-charset without SET NAMES, data recovery without character set Mysql during restore relies heavily on bin-log log Therefore, in order to prevent the loss of data files and bin-log files caused by disk failure, it is best to store bin-log logs in shared storage.

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.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report