docker-compose : 服务器请求客户端未知的身份验证方法
我有这个 yml 文件用于在 docker 中配置 MySQL:
I have this yml file for configuration of MySQL in docker:
# Use root/example as user/password credentials
version: '3.1'
services:
db:
image: mysql
restart: always
environment:
MYSQL_ROOT_PASSWORD: 'pass'
MYSQL_DATABASE: 'db'
MYSQL_USER: 'user'
MYSQL_PASSWORD: 'pass'
adminer:
image: adminer
restart: always
ports:
- 8888:8080
我从 yml 所在的同一目录中使用以下命令启动容器:
And I start the container using following command from the same directory where yml is located:
docker-compose -f stack.yml up
docker-compose -f stack.yml up
然后我得到这个错误:
推荐答案
这对我有用:
image: mysql:5.7
相关文章