当前位置:网站首页>MySQL backup and restore
MySQL backup and restore
2022-06-29 22:01:00 【qq_ twenty-nine million five hundred and sixty-six thousand six】
mysql Backup :
stay MySQL Command to export a table in :mysqldump -h 192.168.5.237 -u root -p dvwa users >user.sql
Command to export a database :mysqldump -h 192.168.5.237 -u root -p -B dvwa >dvwa_backup.sql What needs to be noted here is : -B There are the following differences between adding and not adding :
Add -B
No addition -B
As shown in the above two figures , added -B Later generated sql Statement will create a database create Commands and working with databases use The order ofExport all databases : mysqldump -h 192.168.5.237 -u root -p --all-databases >all_databases.txt
You can also use :mysqldump -h 192.168.5.237 -u root -p -A >all_databases_A.sql
mysql Restore :
Restore database :
mysql -h 192.168.5.1 -u root -p < dvwa.sqlRestore data table :
mysql -h 192.168.5.1 -u root -p test < user.sql
among test Is the name of the database to be imported ,user.sql Create tables and import data sql sentence
边栏推荐
- The logic behind the three whys encountered in technical communication
- Report delivery engineer
- cout 不明确问题
- 状态管理 利用Session限制页面访问 只有通过登录验证SessionLogin.aspx才能访问Session.aspx
- Vipshop Keyword Search API interface (item_search- search vipshop commodity API interface by keyword), vipshop API interface
- 2022 openvino DevCon unveils secrets! Intel and many partners deepen the construction of developer ecology and release the innovation potential of AI industry
- [advanced ROS] Lecture 3 ROS file system and distributed communication
- Motianlun "high availability architecture" dry goods document sharing (including 124 Oracle, MySQL and PG materials)
- Résumé du projet de petite bibliothèque
- Data mining review
猜你喜欢
![The inadvertently discovered [tidb cache table] can solve the read / write hotspot problem](/img/96/b1595b9d2b008b353765caa68fdd3c.png)
The inadvertently discovered [tidb cache table] can solve the read / write hotspot problem

yolov6训练自己的数据记录+yolov5对比测试

Bs-gx-018 student examination system based on SSM

Cloud native database query optimization - statistics and row count estimation

美国隧道法ASTM E84 表面阻燃测试

Shangsilicon Valley real-time data warehouse project (Alibaba cloud real-time data warehouse)

Cout ambiguous problem

ASP.NET 跨页面提交(Button控件页面重定向)

唯品会商品详情API接口(item_get-获得唯品会商品详情接口),唯品会详情API接口

Data mining review
随机推荐
Reading notes on how to connect the network - LAN on the server side (4)
Deep learning remote sensing data set
期末实训 简单通讯录 c语言
Add the applet "lazycodeloading": "requiredcomponents" in taro,
Alibaba product details API interface (item_get- get product details interface), Alibaba API interface
Small library project summary
How to make good use of data science?
What is unique about MES system?
leetcode:370. Interval addition
知识蒸馏(Knowledge Distilling)学习笔记
yolov6训练自己的数据记录+yolov5对比测试
A. Print a Pedestal (Codeforces logo?)
A keepalived high availability accident made me learn it again!
Wechat bulletin number Turing robot realizes intelligent reply
DB queries the database, merges two unrelated tables, adds non-existent fields, and assigns default values
Simple application and configuration of Rsync
How to use SMS to deliver service information to customers? The guide is here!
Cloud native database query optimization - statistics and row count estimation
Huawei cloud AOM version 2.0 release