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


边栏推荐
- 005_ button
- AI落地制造业:智能机器人应具备这4种能力
- Some practical knowledge about PR
- 模块导入reload方法
- Geotools: common tools for mutual conversion of wkt, geojason, feature and featurecollection
- Comprendre le principe AQS (organigramme et schéma de file d'attente synchrone)
- Yyds dry inventory consistent and smooth zoom type and spacing
- Scala basics [introduction and installation]
- Pytorch模型训练到哪里找预训练模型?
- Thinking carefully and fearfully: a software can be transmitted online to monitor whether employees want to "run away"
猜你喜欢
![[pytorch actual combat] generate confrontation network Gan: generate cartoon character avatars](/img/8f/c0cc1c8d19060a60d92c0d72f8b93d.png)
[pytorch actual combat] generate confrontation network Gan: generate cartoon character avatars

007_ checkbox

013_ slider

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

Mobaihe cm201-2-ch-hi3798mv300-300h-emmc and NAND_ Infrared Bluetooth voice_ Brush firmware package

Implementation of a simple camera based on pyqt5

012_ switch

What should be paid attention to in the design and production of the Urban Planning Museum
![[machine learning Q & A] data sampling and model verification methods, hyperparametric optimization, over fitting and under fitting problems](/img/ec/de75eb8279604a57ef7d90406ad7c7.png)
[machine learning Q & A] data sampling and model verification methods, hyperparametric optimization, over fitting and under fitting problems

手势数字启蒙学习机
随机推荐
MySQL monitoring 5
207. curriculum - graph theory, depth traversal
Varnish foundation overview 3
[machine learning Q & A] data sampling and model verification methods, hyperparametric optimization, over fitting and under fitting problems
007_ checkbox
Pytorch模型训练到哪里找预训练模型?
Pytorch中transforms的用法整理
工具与生活服务
手势数字启蒙学习机
001_ layout
[pytorch actual combat] generate confrontation network Gan: generate cartoon character avatars
018_ rate
搞透AQS原理(流程图及同步队列图解)
[graph neural network] overview of graph classification learning [2]: graph classification based on graph neural network
209. minimum length subarray - sliding window
Spark 离线开发框架设计与实现
js Array.from()的5个便捷应用
Matlab 2012a 绘制带箭头的线段
Geotools wkt coordinate system conversion
Leetcode 46 Full arrangement (February 15, 2022)