当前位置:网站首页>Alibaba cloud server docker installation mysql5.5
Alibaba cloud server docker installation mysql5.5
2022-07-06 16:56:00 【LuckyShawn】
Aliyun server docker install mysql5.5
1.docker pull mysql Pull the mirror image
Personal feeling mysql5.5 The version is relatively stable , So choose 5.5 edition
Enter the command to download mysql5.5 Image of version
docker pull mysql:5.5

2. adopt docker image You can view the pulled image
docker images | grep mysql see mysql Mirror image

3. function mysql Containers
docker run -p 3306:3306 --name shawnmysql -v $PWD/conf:/etc/mysql/conf.d -v $PWD/logs:/logs -v $PWD/data:/var/lib/mysql -e MYSQL_ROOT_PASSWORD= Input password -d mysql:5.5
Command specification :
-p 3306:3306: The container of 3306 Port mapping to host's 3306 port .
-v $PWD/conf:/etc/mysql/conf.d: Will host the current directory of conf/my.cnf Attached to the container /etc/mysql/my.cnf.
-v $PWD/logs:/logs: Will host the current directory of logs The directory is attached to the container's /logs.
-v $PWD/data:/var/lib/mysql : Will host the current directory of data The directory is attached to the container's /var/lib/mysql .
-e MYSQL_ROOT_PASSWORD=123456: initialization root User's password .
4. View the running container
docker ps

5. Enter container enter mysql
docker exec -it containerId /bin/bash

You can operate the database directly
complete !
边栏推荐
- Basic principles of video compression coding and audio compression coding
- Tencent interview algorithm question
- 字节跳动开源GAN模型压缩框架,算力最高节省97.8%丨ICCV 2021
- ~75 background
- 我走過最迷的路,是字節跳動程序員的腦回路
- 7-4 harmonic average
- 字节跳动新程序员成长秘诀:那些闪闪发光的宝藏mentor们
- ByteDance technical Interviewer: what kind of candidate do I want to pick most
- Shell_ 02_ Text three swordsman
- LeetCode 1637. The widest vertical area between two points without any point
猜你喜欢

Solve the single thread scheduling problem of intel12 generation core CPU (II)

视频压缩编码和音频压缩编码基本原理
![Saw local status change event StatusChangeEvent [timestamp=1644048792587, current=DOWN, previous=UP]](/img/e6/c53ad67ead1793a2acb93c26e8d377.jpg)
Saw local status change event StatusChangeEvent [timestamp=1644048792587, current=DOWN, previous=UP]

README. txt

~86m rabbit practice

Solr standalone installation

JS encapsulates the method of array inversion -- Feng Hao's blog

LeetCode 1560. The sector with the most passes on the circular track

字节跳动多篇论文入选 CVPR 2021,精选干货都在这里了

我走過最迷的路,是字節跳動程序員的腦回路
随机推荐
LeetCode 1984. Minimum difference in student scores
Go language uses the thrift protocol to realize the client and service end reports not enough arguments in call to oprot Writemessagebegin error resolution
TCP的三次握手和四次挥手
Cmake error: could not create named generator visual studio 16 2019 solution
Codeforces Round #771 (Div. 2)
README. txt
Codeforces Global Round 19
原型链继承
~74 JD top navigation bar exercise
Conception du système de thermomètre numérique DS18B20
~83 form introduction
LeetCode 1550. There are three consecutive arrays of odd numbers
~68 Icon Font introduction
Eureka high availability
Introduction to microservices
~69 other ways to use icon fonts
Solve the problem that intel12 generation core CPU single thread only runs on small cores
7-7 ring the stupid bell
One hundred questions of image processing (11-20)
DS18B20數字溫度計系統設計