docker安装mysql只用一句话
时间: 2023-10-19 17:35:17 浏览: 150
Docker安装mysql
使用Docker安装MySQL只需要一句话的命令:docker run -d --name mysql -e MYSQL_ROOT_PASSWORD=password -p 3306:3306 mysql。
该命令将在Docker中创建并启动一个名为mysql的容器,并将MySQL的3306端口映射到主机的3306端口。同时,指定了MySQL的root用户的密码为password。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* [CentOS Docker 安装MySQL](https://download.csdn.net/download/weixin_38555229/14038004)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatgptT3_2"}}] [.reference_item style="max-width: 50%"]
- *2* *3* [Linux使用Docker安装Nacos并配置MySQL数据源,将Springboot的配置文件部署到Nacos](https://blog.csdn.net/qq_48922459/article/details/122120318)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatgptT3_2"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]
阅读全文