当前位置:网站首页>MySQL 8.0 data backup and recovery
MySQL 8.0 data backup and recovery
2022-07-03 20:21:00 【S_ zhangmin】
Although some management measures have been taken to ensure the security of the database , However, uncertain accidents are always likely to cause data loss , For example, accidental power failure 、 Careless operation errors of the administrator may cause data loss . One of the most important measures to ensure data security is to ensure that data is backed up regularly . If the data in the database is lost or an error occurs , Backup data can be used for recovery , In this way, the loss caused by unexpected causes is reduced as much as possible . Data backup will be introduced 、 Data recovery 、 Relevant knowledge of data migration and data import and Export .
PART1. The data backup
Data backup is one of the most important tasks of Data Administrators . Accidental system crash or hardware damage may lead to the loss of the database , therefore MySQL Administrators should back up databases regularly , So that when an accident happens , Minimize losses . Data backup is 3 Methods .
1. Use MySQLdump Command backup
MySQLdump yes MySQL Provides a very useful database backup tool .MySQLdump When the order is executed , The database can be backed up as a text file , This file actually contains several CREATE and INSERT sentence , Use these statements to recreate tables and insert data .
mysqldump -u user -h host -ppassword dbname[tbname, [tbname...]]>filename.sqluser Represents the user name ;host Indicates the host name of the login user ;password Is the login password ;dbname Name of the database to be backed up ;tbname by dbname The database that needs to be backed up , You can specify multiple tables that need to be backed up ; Right arrow symbol ”>“ tell MySQLdump Write the definition and data of the backup data table to the backup file ;filename.sql Is the name of the backup file .
1. Use MySQLdump Back up all tables in a single database
Just to understand MySQLdump How tools work , Here is a complete database example . Log in first MySQL, Create according to the following database structure booksDB Database and tables , And insert the data record .
Be careful : Here's a guarantee C Under the plate backup Folder exists , Otherwise, an error message will be prompted : The system could not find the specified path .
-- end
边栏推荐
- How to modify the network IP addresses of mobile phones and computers?
- Today's work summary and plan: February 14, 2022
- Phpstudy set LAN access
- Utilisation de base du cadre unitest
- Q&A:Transformer, Bert, ELMO, GPT, VIT
- About callback function and hook function
- Introduction to golang garbage collection
- Instructions for common methods of regular expressions
- JMeter connection database
- 【c】 Digital bomb
猜你喜欢

Part 28 supplement (XXVIII) busyindicator (waiting for elements)

JMeter plug-in installation

Typora charges, WTF? Still need support

Exercises of function recursion

Acquisition and transmission of parameters in automatic testing of JMeter interface

2.3 other data types

LabVIEW training

Introduction to golang garbage collection

Kubernetes cluster builds efk log collection platform

2.5 conversion of different data types (2)
随机推荐
Task of gradle learning
Analysis of gas fee setting under eip1559
JMeter plug-in installation
Test access criteria
Research Report on the overall scale, major manufacturers, major regions, products and application segmentation of rotary tablet presses in the global market in 2022
Gym welcomes the first complete environmental document, which makes it easier to get started with intensive learning!
Initialization and instantiation
Global and Chinese markets for medical temperature sensors 2022-2028: Research Report on technology, participants, trends, market size and share
Oak-d raspberry pie cloud project [with detailed code]
4. Data splitting of Flink real-time project
It is discussed that the success of Vit lies not in attention. Shiftvit uses the precision of swing transformer to outperform the speed of RESNET
Test changes in Devops mode -- learning and thinking
The global industrial design revenue in 2021 was about $44360 million, and it is expected to reach $62720 million in 2028. From 2022 to 2028, the CAGR was 5.5%
Use of CMD command
Titles can only be retrieved in PHP via curl - header only retrieval in PHP via curl
Geek Daily: the system of monitoring employees' turnover intention has been deeply convinced off the shelves; The meta universe app of wechat and QQ was actively removed from the shelves; IntelliJ pla
Acquisition and transmission of parameters in automatic testing of JMeter interface
Global and Chinese markets of polyimide tubes for electronics 2022-2028: Research Report on technology, participants, trends, market size and share
2.7 format output of values
Global and Chinese market of two in one notebook computers 2022-2028: Research Report on technology, participants, trends, market size and share