当前位置:网站首页>[MySQL 06] backup and restore MySQL database in Linux + docker container environment
[MySQL 06] backup and restore MySQL database in Linux + docker container environment
2022-06-30 01:57:00 【Rusty well began】
1、 Back up the... In the container MySQL Complete database :
command : docker exec -it docker Container name mysqld -uroot -p Database password Database name > Backup filename .sql
eg: docker exec -it phoenix_mysql mysqldump -uroot -psiteweb1! phoenix > phoenix.sql

2、 Restore in container MySQL Complete database
<1> First create the target database
create database phoenix;
<2> Then move the backup file to the container
docker cp File path to copy Container name : To copy to the corresponding path in the container
docker cp phoenix.sql phoenix_mysql:/
<3> Then log in to the database , Restore database
mysql -uroot -p
use phoenix;
source /phoenix.sql;


边栏推荐
- What are the payment and distribution systems?
- If mybaits cannot query the data, it can query how to change it in the database
- 图解 Google V8 # 19 :异步编程(二):V8 是如何实现 async/await 的?
- Is the processor the main factor in buying a mobile phone?
- Yyds dry inventory consistent and smooth zoom type and spacing
- App test related tools
- Is it safe to open an account in Sinosteel futures?
- 【机器学习Q&A】准确率、精确率、召回率、ROC和AUC
- GeoTools:WKT、GeoJson、Feature、FeatureCollection相互转换常用工具
- Cookie encryption 13
猜你喜欢
![[graph neural network] summary of graph classification study [3]: evaluation of graph classification methods and future research directions](/img/b1/2afa73a14b2f41b7a65c4c2d261e6a.png)
[graph neural network] summary of graph classification study [3]: evaluation of graph classification methods and future research directions

JS reverse request parameter encryption:

What should I do when I feel confused after graduation from university?

Using face_ Recognition library reports an error reason: cudnn_ STATUS_ NOT_ SUPPORTED

C语言 换个格式输出整数

Add a second network card (network interface NIC) for the virtual machine in azure portal in 2 minutes

AI落地制造业:智能机器人应具备这4种能力

【MySQL 05】SUSE 12 SP5 安装MySQL后第一次修改mysql密码

C语言 继续(3n+1)猜想

【机器学习Q&A】余弦相似度、余弦距离、欧式距离以及机器学习中距离的含义
随机推荐
C语言 继续(3n+1)猜想
当大学毕业感到迷茫怎么办?
Yyds dry inventory consistent and smooth zoom type and spacing
What to remember about the penalty for deduction of points in Item 1
Local page floating animation is realized with the help of scroll wheel
Circular right shift of array elements in C language
Cookie encryption 11
If you want to install a set of monitoring, what is the process? How much is it?
C语言 数组元素循环右移问题
Unity2D--给动画添加关键帧并绑定事件
Electron FAQ 54 - make your own fireworks based on electron
Conversion between opencv and image (valid for pro test)
(1) Basic learning - figure out the difference between pin, pad, port, IO and net
Pytoch modifies the hook source code to obtain per layer output parameters (with layer name)
Application features and functions of painting Aquarium
Mobaihe cm201-2-ch-hi3798mv300-300h-emmc and NAND_ Infrared Bluetooth voice_ Brush firmware package
魔百盒CM201-2-CH-Hi3798MV300-300H-EMMC和NAND_红外蓝牙语音_通刷固件包
GeoTools WKT坐标系转换
8 — router
C language number prime