当前位置:网站首页>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 !
边栏推荐
- 7-10 punch in strategy
- ~75 background
- ~79 Movie card exercise
- LeetCode 1020. Number of enclaves
- Audio and video development interview questions
- The "advertising maniacs" in this group of programmers turned Tiktok advertisements into ar games
- Solr new core
- LeetCode 1638. Count the number of substrings with only one character difference
- ByteDance technical Interviewer: what kind of candidate do I want to pick most
- Codeforces Round #771 (Div. 2)
猜你喜欢
~82 style of table
The QT program compiled on CentOS lacks a MySQL driven solution
Cmake Express
One hundred questions of image processing (11-20)
~68 Icon Font introduction
字节跳动春招攻略:学长学姐笔经面经,还有出题人「锦囊」
Gridhome, a static site generator that novices must know
Solr standalone installation
~Introduction to form 80
字节跳动2022校招研发提前批宣讲会,同学们最关心的10个问题
随机推荐
~Introduction to form 80
亮相Google I/O,字节跳动是这样应用Flutter的
字节跳动春招攻略:学长学姐笔经面经,还有出题人「锦囊」
redux使用说明
Fdog series (4): use the QT framework to imitate QQ to realize the login interface, interface chapter.
ByteDance technical Interviewer: what kind of candidate do I want to pick most
Fdog series (VI): use QT to communicate between the client and the client through the server (less information, recommended Collection)
Shell_ 03_ environment variable
数据传送指令
Data config problem: the reference to entity 'useunicode' must end with ';' delimiter.
How to generate six digit verification code
JS encapsulates the method of array inversion -- Feng Hao's blog
Soft music -js find the number of times that character appears in the string - Feng Hao's blog
~70 row high
面试集锦库
字节跳动2022校招研发提前批宣讲会,同学们最关心的10个问题
LeetCode 1557. The minimum number of points that can reach all points
Saw local status change event StatusChangeEvent [timestamp=1644048792587, current=DOWN, previous=UP]
~72 horizontal and vertical alignment of text
Jedis