当前位置:网站首页>搭建大型分布式服务(四)Docker搭建开发环境安装Mysql
搭建大型分布式服务(四)Docker搭建开发环境安装Mysql
2022-08-09 12:58:00 【hanyi_】
一、本文要点
本文将介绍利用docker快速搭建开发环境,搭建mysql实例。系列文章完整目录
- docker 命令
- docker 安装mysql
- docker 登录镜像实例
二、开发环境
- docker 18.09.7, build 2d0083d
- linux 64位
- mysql 5.6.46
三、安装docker
参考:https://blog.csdn.net/caiwen_5050/article/details/85245106
四、执行命令
# 获取镜像
docker search mysql
docker pull mysql:5.6
# 创建目录
mkdir -p /data/mysql/data
mkdir -p /data/mysql/conf
mkdir -p /data/mysql/logs
# 安装mysql,端口3306
cd /data/mysql/
docker run -p 3306:3306 --name mysql -v $PWD/conf:/etc/mysql/conf.d -v $PWD/logs:/logs -v $PWD/data:/var/lib/mysql -e MYSQL_ROOT_PASSWORD=12346 -d mysql:5.6
五、验证一下
docker exec -it mysql /bin/bash
mysql -hlocalhost -uroot -p123456
七、小结
简单几条命令,就安装好mysql了,是不是很简单。下一篇《搭建大型分布式服务(五)Springboot整合mybatis》
加我一起交流学习!
边栏推荐
- Redis源码剖析之数据过期(expire)
- 基于 R 语言的判别分析介绍与实践 LDA和QDA
- 剑指 Offer 43. 1~n 整数中 1 出现的次数(递归、数学)
- 正则表达式-re模块
- FFMPEG多媒体文件处理(ffmpeg文件的删除与重命名)
- 安踏携手华为运动健康共同验证冠军跑鞋 创新引领中国体育
- Flutter entry and advanced tour (6) Layout Widget
- The sword refers to Offer 57 - II. and is a continuous positive sequence of s (sliding window)
- 农村区县域农业电商如何做?数字化转型如何进行?
- ERP不规范,同事两行泪 (转载非原创)
猜你喜欢
随机推荐
jenkins api create custom pipeline
OOM排查和处理
Use RecyclerView to implement three-level collapsed list
Microsoft 10/11 命令行打开系统设置页(WUAP,!WIN32)
Clock frequency and baud rate count for serial communication in FPGA
陈强教授《机器学习及R应用》课程 第十八章作业
jenkins api创建自定义pipeline
GIN file upload and return
Redis源码剖析之跳表(skiplist)
Extract EventBus encapsulation to base class using annotations
NFS pays special attention to the problem of permissions
Do you know the difference between comments, keywords, and identifiers?
Ledong Fire Rescue Brigade was invited to carry out fire safety training for cadres
Professor Chen Qiang's "Machine Learning and R Application" course Chapter 14 Assignment
万物皆可柯里化的 Ramda.js
[MRCTF2020]套娃-1
绘制混合密度函数图以及添加分位数线
FPGA-近日工作总结
FFmpeg多媒体文件处理(ffmpeg操作目录及list的实现)
Uni - app - uview Swiper shuffling figure component, click on the links to jump (click to get the item after the row data, remove data operation)









