当前位置:网站首页>搭建大型分布式服务(四)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》
加我一起交流学习!
边栏推荐
- 剑指offer,剪绳子2
- RTSP协议讲解
- 5G China unicom 一般性异常处理
- LeetCode 37. Solve Sudoku
- Use RecyclerView to implement three-level collapsed list
- SQL Server查询优化 (转载非原创)
- 面试题精选:神奇的斐波那契数列
- How to solve the 0x80070005 error when the computer is reinstalled and the system is restored
- 第六届”蓝帽杯“全国大学生网络安全技能大赛 半决赛
- telnet+ftp to control and upgrade the device
猜你喜欢

Explanation of RTSP protocol

乐东消防救援大队应邀为干部开展消防安全培训

Redis源码剖析之跳表(skiplist)

Flutter Getting Started and Advanced Tour (7) GestureDetector

kustomize入门示例及基本语法使用说明

novel research

Map mixed density function and quantile added line

FPGA中串口通信的时钟频率和波特率计数

5G China unicom 直放站 网管协议 实时性要求

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)
随机推荐
Professor Chen Qiang's "Machine Learning and R Application" course Chapter 13 Assignment
陈强教授《机器学习及R应用》课程 第十七章作业
glibc 内存管理模型 释放 C库内存缓存
JVM之配置介绍(一)
Sandbox中的进程/线程相关-1
Standing wave ratio calculation method
How to reduce the size of desktop icons after the computer is reinstalled
5G China unicom general exception handling
GET POST PUT DELETE request in GIN
GIN初探,环境安装
ARM板卡增加路由功能
uni-app - uview Swiper 轮播图组件点击跳转链接(点击后拿到 item 行数据, 取出数据做操作)
GIN a preliminary study, the environment is installed
RTSP协议讲解
2022年非一线IT行业就业前景?
Clock frequency and baud rate count for serial communication in FPGA
剑指 Offer 21. 调整数组顺序使奇数位于偶数前面(循环不变量)
Anta and Huawei Sports Health jointly verify the champion running shoes and lead Chinese sports with innovation
WPF 实现带蒙版的 MessageBox 消息提示框
Oracle Recovery Tools修复空闲坏块