当前位置:网站首页>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 !
边栏推荐
- Record the error reason: terminate called after throwing an instance
- LeetCode 1641. Count the number of Lexicographic vowel strings
- 汇编课后作业
- After the subscript is used to assign a value to the string type, the cout output variable is empty.
- Restful style interface design
- ~75 background
- 这群程序员中的「广告狂人」,把抖音广告做成了AR游戏
- 字节跳动2022校招研发提前批宣讲会,同学们最关心的10个问题
- ~68 Icon Font introduction
- 字节跳动多篇论文入选 CVPR 2021,精选干货都在这里了
猜你喜欢
Cmake Express
姚班智班齐上阵,竞赛高手聚一堂,这是什么神仙编程大赛?
谢邀,人在工区,刚交代码,在下字节跳动实习生
redux使用说明
Fdog series (V): use QT to imitate QQ to realize login interface to main interface, function chapter.
Detailed explanation of FLV format
~76 sprite map
TCP的三次握手和四次挥手
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
When it comes to Google i/o, this is how ByteDance is applied to flutter
随机推荐
Yao BanZhi and his team came together, and the competition experts gathered together. What fairy programming competition is this?
服务器端渲染(SSR)和客户端渲染(CSR)的区别
SQL quick start
搭建flutter环境入坑集合
MP4格式详解
亮相Google I/O,字节跳动是这样应用Flutter的
was unable to send heartbeat
Restful style interface design
Ffmpeg command line use
LeetCode 1637. The widest vertical area between two points without any point
逻辑运算指令
Shell_ 01_ data processing
LeetCode 1558. Get the minimum number of function calls of the target array
[graduation project] QT from introduction to practice: realize imitation of QQ communication, which is also the last blog post in school.
~77 linear gradient
~68 Icon Font introduction
ByteDance 2022 school recruitment R & D advance approval publicity meeting, students' top 10 issues
Li Kou leetcode 280 weekly match
LeetCode 1020. Number of enclaves
~Introduction to form 80