当前位置:网站首页>Docker install MySQL
Docker install MySQL
2022-07-04 07:15:00 【MambaCloud】
docker install mysql
1、 First, install it docker
2、 Pull the latest mysql Mirror version
[[email protected] ~]# docker pull mysql:latest
latest: Pulling from library/mysql
72a69066d2fe: Pull complete
93619dbc5b36: Pull complete
99da31dd6142: Pull complete
626033c43d70: Pull complete
37d5d7efb64e: Pull complete
ac563158d721: Pull complete
d2ba16033dad: Pull complete
688ba7d5c01a: Pull complete
00e060b6d11d: Pull complete
1c04857f594f: Pull complete
4d7cfa90e6ea: Pull complete
e0431212d27d: Pull complete
Digest: sha256:e9027fe4d91c0153429607251656806cc784e914937271037f7738bd5b8e7709
Status: Downloaded newer image for mysql:latest
3、 View local image
[[email protected] ~]# docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
mysql latest 3218b38490ce 7 weeks ago 516MB
4、 Run container
[[email protected] ~]# docker run -itd --name mysql-test -p 3306:3306 -e MYSQL_ROOT_PASSWORD=123456 mysql
b827facfe1926df7842f7a407d57e0458f26122a1576ba27203a676540f2c126
5、 View currently running containers
[[email protected] ~]# docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
b827facfe192 mysql "docker-entrypoint.s…" 42 seconds ago Up 40 seconds 0.0.0.0:3306->3306/tcp, 33060/tcp mysql-test
6、 Enter the container and connect to it normally mysql
[[email protected] ~]# docker exec -it mysql-test bash
[email protected]:/# mysql
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
[email protected]:/# mysql -h localhost -u root -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 9
Server version: 8.0.27 MySQL Community Server - GPL
Copyright (c) 2000, 2021, Oracle and/or its affiliates.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql>
边栏推荐
- A new understanding of how to encrypt industrial computers: host reinforcement application
- [thread pool]
- [FPGA tutorial case 7] design and implementation of counter based on Verilog
- Enter the year, month, and determine the number of days
- 【FPGA教程案例7】基于verilog的计数器设计与实现
- Responsive - media query
- Selenium driver ie common problem solving message: currently focused window has been closed
- Boosting the Performance of Video Compression Artifact Reduction with Reference Frame Proposals and
- 由于dms升级为了新版,我之前的sql在老版本的dms中,这种情况下,如何找回我之前的sql呢?
- Finishing (III) - Exercise 2
猜你喜欢

Zhanrui tankbang | jointly build, cooperate and win-win zhanrui core ecology

Solution of running crash caused by node error

com. alibaba. nacos. api. exception. NacosException

Boosting the Performance of Video Compression Artifact Reduction with Reference Frame Proposals and

the input device is not a TTY. If you are using mintty, try prefixing the command with ‘winpty‘

BasicVSR++: Improving Video Super-Resolutionwith Enhanced Propagation and Alignment

Knowledge payment applet dream vending machine V2
![SQL foundation 9 [grouping data]](/img/8a/a72941d8c3413316b063033a1b5038.jpg)
SQL foundation 9 [grouping data]

BasicVSR++: Improving Video Super-Resolutionwith Enhanced Propagation and Alignment

云Redis 有什么用? 云redis怎么用?
随机推荐
关于IDEA如何设置快捷键集
The difference between synchronized and lock
Responsive mobile web test questions
Check and display one column in the known table column
[Android reverse] function interception (use cache_flush system function to refresh CPU cache | refresh CPU cache disadvantages | recommended time for function interception)
Chain ide -- the infrastructure of the metauniverse
Node connection MySQL access denied for user 'root' @ 'localhost' (using password: yes
The cloud native programming challenge ended, and Alibaba cloud launched the first white paper on application liveliness technology in the field of cloud native
How can the old version of commonly used SQL be migrated to the new version?
[Flink] temporal semantics and watermark
测试用例的设计
【Kubernetes系列】Kubernetes 上安装 KubeSphere
CMS source code of multi wechat management system developed based on thinkphp6, with one click curd and other functions
Novel website program source code that can be automatically collected
Lottery system test report
ABCD four sequential execution methods, extended application
提升复杂场景三维重建精度 | 基于PaddleSeg分割无人机遥感影像
uniapp小程序分包
大厂技术专家:架构设计中常用的思维模型
2022 - 021arts: début du deuxième semestre