当前位置:网站首页>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 !
边栏推荐
- ~79 Movie card exercise
- How to configure hosts when setting up Eureka
- Many papers on ByteDance have been selected into CVPR 2021, and the selected dry goods are here
- ~72 horizontal and vertical alignment of text
- Gridhome, a static site generator that novices must know
- Simply try the new amp model of deepfacelab (deepfake)
- Error occurred during initialization of VM Could not reserve enough space for object heap
- "One year after graduation, I won ACL best paper"
- LeetCode 1020. Number of enclaves
- ~73 other text styles
猜你喜欢

Fdog series (V): use QT to imitate QQ to realize login interface to main interface, function chapter.

Fdog series (4): use the QT framework to imitate QQ to realize the login interface, interface chapter.

~86m rabbit practice

LeetCode 1552. Magnetic force between two balls

LeetCode 1020. Number of enclaves

One hundred questions of image processing (1-10)

谢邀,人在工区,刚交代码,在下字节跳动实习生

这116名学生,用3天时间复刻了字节跳动内部真实技术项目

TCP的三次握手和四次挥手

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
随机推荐
koa中间件
Eureka single machine construction
LeetCode 1550. There are three consecutive arrays of odd numbers
ByteDance technical Interviewer: what kind of candidate do I want to pick most
The 116 students spent three days reproducing the ByteDance internal real technology project
Shell_ 00_ First meeting shell
Fdog series (I): think about it. It's better to write a chat software. Then start with the imitation QQ registration page.
Basic principles of video compression coding and audio compression coding
LeetCode 1545. Find the k-th bit in the nth binary string
The "advertising maniacs" in this group of programmers turned Tiktok advertisements into ar games
Fdog series (III): use Tencent cloud SMS interface to send SMS, write database, deploy to server, web finale.
~74 JD top navigation bar exercise
Solr standalone installation
Mp4 format details
LeetCode 1560. The sector with the most passes on the circular track
Error occurred during initialization of VM Could not reserve enough space for object heap
7-8 likes (need to continue to improve)
字节跳动开源GAN模型压缩框架,算力最高节省97.8%丨ICCV 2021
Saw local status change event StatusChangeEvent [timestamp=1644048792587, current=DOWN, previous=UP]
100张图训练1小时,照片风格随意变,文末有Demo试玩|SIGGRAPH 2021