当前位置:网站首页>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 !
边栏推荐
- Thank you for your invitation. I'm in the work area. I just handed in the code. I'm an intern in the next ByteDance
- One hundred questions of image processing (1-10)
- LeetCode 1552. Magnetic force between two balls
- LeetCode 1545. Find the k-th bit in the nth binary string
- Erlang installation
- 算数运算指令
- ~Introduction to form 80
- LeetCode 1640. Can I connect to form an array
- Sublime text code formatting operation
- Simply try the new amp model of deepfacelab (deepfake)
猜你喜欢

LeetCode 1584. Minimum cost of connecting all points

LeetCode 1637. The widest vertical area between two points without any point

字节跳动2022校招研发提前批宣讲会,同学们最关心的10个问题

~68 Icon Font introduction

LeetCode 1020. Number of enclaves

How to configure hosts when setting up Eureka

One hundred questions of image processing (1-10)

Shell_ 03_ environment variable

Basic principles of video compression coding and audio compression coding

Shell_ 00_ First meeting shell
随机推荐
Cmake error: could not create named generator visual studio 16 2019 solution
Saw local status change event StatusChangeEvent [timestamp=1644048792587, current=DOWN, previous=UP]
LeetCode 1545. Find the k-th bit in the nth binary string
「博士毕业一年,我拿下 ACL Best Paper」
The most lost road I have ever walked through is the brain circuit of ByteDance programmers
~75 background
Train 100 pictures for 1 hour, and the style of the photos changes at will. There is a demo at the end of the article | siggraph 2021
Full record of ByteDance technology newcomer training: a guide to the new growth of school recruitment
~71 abbreviation attribute of font
~83 form introduction
LeetCode 1551. Minimum operand to make all elements in the array equal
LeetCode 1566. Repeat the pattern with length m at least k times
逻辑运算指令
"One year after graduation, I won ACL best paper"
7-10 punch in strategy
Data config problem: the reference to entity 'useunicode' must end with ';' delimiter.
LeetCode 1562. Find the latest group of size M
Error occurred during initialization of VM Could not reserve enough space for object heap
Fdog series (VI): use QT to communicate between the client and the client through the server (less information, recommended Collection)
~85 transition