当前位置:网站首页>Docker installing MySQL
Docker installing MySQL
2022-06-30 21:52:00 【Tata Tata y】
Do not specify version number , Download the latest version by default :
docker pull mysql
Specified version number
docker pull mysql:5.7
After the mirror image is pulled , Create with this image mysql example , Use the following command to create
sudo docker run \
-p 3306:3306 --name mysql \
-v /mydata/mysql/log:/var/log/mysql \
-v /mydata/mysql/data:/var/lib/mysql \
-v /mydata/mysql/conf:/etc/mysql \
-e MYSQL_ROOT_PASSWORD=root \
-d mysql:5.7
Configure port mapping :
-p 3306:3306 --name mysql
The container of 3306 Port mapping to host's 3306 port
To configure mysql Data volume mount
1.-v /mydata/mysql/log:/var/log/mysql( Log file mount )
Mount the log folder in the container to the corresponding /var/log/mysql In the folder
2.-v /mydata/mysql/data:/var/lib/mysql( Data file mount )
Mount the data folder in the container to the corresponding /var/lib/mysql In the folder
3.-v /mydata/mysql/conf:/etc/mysql( Profile mount )
Mount the configuration folder of the container to the corresponding /etc/mysql In the folder
Configure users
-e MYSQL_ROOT_PASSWORD=root
Set initialization root User's password
Specify mirror resources
-d mysql:5.7
-d: Run the instance in background mode
mysql:5.7: Specify to use this image to create a running instance
After the creation is successful, use the following command to view the created mysql example :
docker ps -a
边栏推荐
- Development techniques - import files using easyexcel (simple example)
- Introduce an online platform for multi omics integration and network visual analysis
- 1-12 初步认识Express
- Introduction and example of template method mode
- 1-15 nodemon
- PyTorch量化实践(2)
- 【回溯】全排列 II leetcode47
- Can flinksql two Kafka streams join?
- Ten security measures against unauthorized access attacks
- 1-19 using CORS to solve interface cross domain problems
猜你喜欢

介绍一款|用于多组学整合和网络可视化分析的在线平台

Introduce an online platform for multi omics integration and network visual analysis

Ten security measures against unauthorized access attacks

Arcmap|assign values to different categories of IDS with the field calculator

clickhouse原生監控項,系統錶描述

Deployment and use of Nacos

5g demand in smart medicine

qsort函数和模拟实现qsort函数

PyTorch量化实践(2)

《ClickHouse原理解析与应用实践》读书笔记(3)
随机推荐
1-13 express listens to get and post requests & processes requests
京东与腾讯续签三年战略合作协议;起薪涨至26万元,韩国三星SK争相加薪留住半导体人才;Firefox 102 发布|极客头条
It is urgent for enterprises to protect API security
将el-table原样导出为excel表格
Some problems when SSH default port is not 22
To the Sultanate of Anderson
PyTorch量化感知训练(QAT)步骤
Installing jupyter notebook under Anaconda
Can flinksql two Kafka streams join?
Ml & DL: Introduction à l’optimisation des hyperparamètres, indice d’évaluation, phénomène de surajustement et introduction détaillée aux méthodes d’optimisation des paramètres couramment utilisées da
Pytorch quantitative perception training (qat) steps
1-15 nodemon
1-11 创建线上文件服务
兴奋神经递质——谷氨酸与大脑健康
Reading notes of Clickhouse principle analysis and Application Practice (3)
[untitled]
Open the jupyter notebook/lab and FAQ & settings on the remote server with the local browser
看阿里云 CIPU 的 10 大能力
1-10 根据不同的url响应客户端的内容
1-15 nodemon