当前位置:网站首页>[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;


边栏推荐
- Varnish foundation overview 4
- 005_ button
- [mrctf2020]ezpop-1 | PHP serialization
- [machine learning Q & A] data sampling and model verification methods, hyperparametric optimization, over fitting and under fitting problems
- [machine learning Q & A] cosine similarity, cosine distance, Euclidean distance and the meaning of distance in machine learning
- 【图神经网络】图分类学习研究综述[2]:基于图神经网络的图分类
- cookie加密8
- GeoTools:WKT、GeoJson、Feature、FeatureCollection相互转换常用工具
- (1)基础学习——图解pin、pad、port、IO、net 的区别
- C language I want to pass
猜你喜欢

搞透AQS原理(流程图及同步队列图解)
![[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

Cookie encryption 8

魔百盒CM201-2-CH-Hi3798MV300-300H-EMMC和NAND_红外蓝牙语音_通刷固件包

DTW学习(dynamic time warping)——思想、代码实现

搞透AQS原理(流程圖及同步隊列圖解)

012_ switch

Design and implementation of spark offline development framework

What is idempotency? Detailed explanation of four interface idempotence schemes!
![【图神经网络】图分类学习研究综述[3]:图分类方法评价及未来研究方向](/img/b1/2afa73a14b2f41b7a65c4c2d261e6a.png)
【图神经网络】图分类学习研究综述[3]:图分类方法评价及未来研究方向
随机推荐
Varnish foundation overview 5
MySQL monitoring 6
假離婚變成真離婚,財產怎麼辦
Using grpcui to test asp Net core grpc service
Summary of DOM
[binary tree] maximum binary tree II
[MySQL 04] sauvegarde et restauration de la base de données MySQL sous Linux en utilisant MySQL Workbench 8.0 ce
The (3n+1) conjecture that C language kills people without paying for their lives
Cookie encryption 9
C语言 素数对猜想
CheapSwap 协议的诞生
MySQL monitoring 1
9 — 正则校验集合
If mybaits cannot query the data, it can query how to change it in the database
C language output integer in another format
018_ rate
207. curriculum - graph theory, depth traversal
Gesture digital enlightenment learning machine
(1)基础学习——图解pin、pad、port、IO、net 的区别
GeoTools:WKT、GeoJson、Feature、FeatureCollection相互转换常用工具