当前位置:网站首页>Docker installs MySQL 8.0. Detailed steps
Docker installs MySQL 8.0. Detailed steps
2022-06-24 22:21:00 【Nice2cu_ Code】
Docker install MySQL 8.0
List of articles
One 、 Pull the mirror image
docker pull mysql:8.0.21
Two 、 Look at the mirror image
docker images

3、 ... and 、 Run container
docker run -it -d --name mysql --net=host \
-m 500m -v /root/mysql/data:/var/lib/mysql \
-v /root/mysql/config:/etc/mysql/conf.d \
-e MYSQL_ROOT_PASSWORD=abc123456 \
-e TZ=Asia/Shanghai mysql:8.0.21 \
--lower_case_table_names=1
Code meaning :
docker run -p Local host port number : Container service port number --name Container name [-e Configuration information modification ] -d Mirror name
- conf.d Is the configuration file of the database
- MYSQL_ROOT_PASSWORD Specify database password , The default account name is root
- lower_case_table_names=1 Turn off case sensitivity for database names
Four 、 Check operation
docker ps

5、 ... and 、 Into the container
docker exec -it mysql8.0 /bin/bash
6、 ... and 、 To configure MySQL
1. Get into MySQL

2. Configure support for remote connections
ALTER USER 'root'@'%' IDENTIFIED WITH mysql_native_password BY 'MySQL Password ';
# Refresh database
flush privileges;

边栏推荐
- Huada 04A operating mode / low power consumption mode
- PostMan工具介绍及安装使用
- 故障安全移动面板KTP900F Mobile下载程序提示无法下载,目标设备正在运行或未处于传输模式的解决办法
- After Firefox drag and drop, Baidu search will always be opened by default. If it is a picture, the picture will be opened.
- Common voting governance in Dao
- 磁盘的结构
- How to extract dates from web pages?
- L2 元年,Arbitrum Nitro 升级带来更兼容高效的开发体验
- Flutter: Unsupported value: false/true
- Uncover the secret of station B. is it true that programmers wear women's clothes and knock code more efficiently?
猜你喜欢
Uncover the secret of station B. is it true that programmers wear women's clothes and knock code more efficiently?
Réduire le PIP à la version spécifiée (mettre à jour le PIP avec pycharm avant de le réduire à la version originale)
一个女孩子居然做了十年硬件。。。
DAO 中常见的投票治理方式
华大04a工作模式/低功耗模式
Information update on automatic control principle
“阿里健康”们的逻辑早就变了
Flutter 如何使用在线转码工具将 JSON 转为 Model
Resolving the conflict problem of the flutter Library
Creating files, recursively creating directories
随机推荐
LINQ query collection class introductory cases Wulin expert class
想当测试Leader,这6项技能你会吗?
Redis+caffeine two-level cache enables smooth access speed
Shutter precautions for using typedef
Drag drag drag
How does flutter use the online transcoding tool to convert JSON to model
Development trend and path of SaaS industry in China
树莓派初步使用
好想送对象一束花呀
如何比较两个或多个分布:从可视化到统计检验的方法总结
First order model realizes photo moving (with tool code) | machine learning
NIO 零拷贝
磁盤的結構
Description of software version selection of kt6368a Bluetooth dual-mode transparent chip
字符串习题总结2
Information update on automatic control principle
“阿里健康”们的逻辑早就变了
OA system -- save the verification code to session
【OpenCV 例程200篇】209. HSV 颜色空间的彩色图像分割
Practice of hierarchical management based on kubesphere