当前位置:网站首页>docker: Error response from daemon: Conflict. The container name “/mysql“ is already in use by conta
docker: Error response from daemon: Conflict. The container name “/mysql“ is already in use by conta
2022-06-22 16:17:00 【一碗谦谦粉】
一、问题描述
docker安装好MySQL后,创建实例并启动时报错:
docker: Error response from daemon: Conflict. The container name "/mysql" is already in use by container "5e1f4861f523bdff7cfcfb538d405ac506558b771f880ea4276a3104dfd49b5b". You have to remove (or rename) that container to be able to reuse that name.

二、解决
(1)移除原来的container ID(就是长长的那串数字)
docker rm + container ID
(2)再创建新容器
docker run -p 3306:3306 --name mysql \
-v /mydata/mysql/log:/var/log/mysql \
-v /mydata/mysql/data:/var/lib/mysql \
-v /mydata/mysql/conf:/etc/mysql \
-e MYSQL_ROOT_PASSWORD=root \
-d mysql:5.7(3)测试一下有没有成功


边栏推荐
- 缺失值处理
- This article takes you to master the use of tcpdump command
- Tried several report tools, and finally found a report based on Net 6
- 轻松上手Fluentd,结合 Rainbond 插件市场,日志收集更快捷
- Hello playwright: (7) simulate keyboard and mouse
- Blazor University (30)表单 —— 从 InputBase 派生
- 快速掌握 ASP.NET 身份认证框架 Identity - 登录与登出
- 0基础如何入门软件测试,能转行成功吗?
- Some difficulties in making web pages
- You call this crap high availability?
猜你喜欢
![[step 1 of advanced automated testing] 1 minute to introduce you to automated testing](/img/00/9647d552749092954a91bd84307773.png)
[step 1 of advanced automated testing] 1 minute to introduce you to automated testing

Figure operation flow of HAMA BSP Model

企业级软件开发新模式:低代码

client-go gin的简单整合十-Update

缺失值處理

Blazor University (31)表单 —— 验证

新手必会的静态站点生成器——Gridsome

【FPGA+PWM】基于FPGA的三相PWM整流器移相触发电路的设计与实现

Quickly master asp Net authentication framework identity - user registration

Blazor University (31) form - Validation
随机推荐
ABP Framework 5.3.0 版本新增功能和变更说明
JMeter use case
WPF effect chapter 190: playing listbox again
短视频直播源码,EditText输入框的使用
This article takes you to master the use of tcpdump command
How to understand volatile
Scala equality
[cursor nesting] nesting of MySQL stored procedure cursors
0基础如何入门软件测试,能转行成功吗?
Description of new features and changes in ABP Framework version 5.3.0
如何做好研发效能度量及指标选取
Quickly master asp Net authentication framework identity - user registration
Defaultifempty for C # -linq source code analysis
测试组的任务职责和测试的基本概念
【FPGA+PWM】基于FPGA的三相PWM整流器移相触发电路的设计与实现
A classmate asked what framework PHP should learn?
Application description of DAP fact table processing summary function
When online and offline integration accelerates and information docking channels are diversified, the traditional center will not be necessary
Short video live broadcast source code, use of EditText input box
Noah fortune plans to land on the Hong Kong Stock Exchange: the performance fell sharply in the first quarter, and once stepped on the thunder "Chengxing case"