在Docker中的MySQL在root密码配置中冻结 [英] MySQL in Docker frozen at root password config

查看:1271
本文介绍了在Docker中的MySQL在root密码配置中冻结的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有下一个码头文件:

FROM ubuntu:16.04
RUN apt-get update && apt-get upgrade -y && apt-get install -y apache2 mysql-server mysql-client

之后,Docker建立询问密码root:

After, Docker build asking me the password root:

While not mandatory, it is highly recommended that you set a password for the
MySQL administrative "root" user.

If this field is left blank, the password will not be changed.

New password for the MySQL "root" user:

我输入密码,但是,只是它保持在该状态。

I enter the password, but, simply it stays in that state.

我可以这样安装mysql吗?我不想自动安装

Can I install mysql this way?, I do not want to install it automatically

推荐答案

Docker方式是一个进程的一个容器。
您需要一个容器用于apache,一个用于mysql。
您可以使用官方php图像官方mysql图像

Docker way is "one container for one process". You need one container for apache and one for mysql. You can use official php image and official mysql image

用于链接容器我建议使用docker-compose

for linking the containers i recommend use docker-compose

这篇关于在Docker中的MySQL在root密码配置中冻结的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆