用docker service 来 create wordpress不幸失败
来源:7-4 在swarm集群里通过service部署wordpress
sd1700092
2018-10-18
docker service create --name mysql --env MYSQL_ROOT_PASSWORD=root --env MYSQL_DATABASE=wordpress --network demo --mount type=volume,source=mysql-data,destination=/var/lib/mysql mysql
docker service create --name wordpress -p 80:80 --env WORDPRESS_DB_PASSWORD=root --env WORDPRESS_DB_HOST=mysql --network demo wordpress
命令如实按照老师给的敲进去。
然后报错了,
用docker service ps wordpress发现:
ID NAME IMAGE NODE DESIRED STATE CURRENT STATE ERROR PORTS
l8qnn0zlkhit wordpress.1 wordpress:latest swarm-worker1 Running Running 12 seconds ago
fy3apqo29r8x \_ wordpress.1 wordpress:latest swarm-worker1 Shutdown Failed 18 seconds ago "task: non-zero exit (1)"
6dad0hv9rnrt \_ wordpress.1 wordpress:latest swarm-worker1 Shutdown Failed 52 seconds ago "task: non-zero exit (1)"
lbzsf8o33v78 \_ wordpress.1 wordpress:latest swarm-worker1 Shutdown Failed about a minute ago "task: non-zero exit (1)"
hobffy3tpxhn \_ wordpress.1 wordpress:latest swarm-worker1 Shutdown Failed 2 minutes ago "task: non-zero exit (1)"
请看,都是Failed信息,详细日志里"task: non-zero exit (1)"不知道是什么意思?
1回答
-
sd1700092
提问者
2018-10-18
老师,我又用docker logs查看了一下wordpress container的日志。
Warning: mysqli::__construct(): The server requested authentication method unknown to the client [caching_sha2_password] in Standard input code on line 22
Warning: mysqli::__construct(): (HY000/2054): The server requested authentication method unknown to the client in Standard input code on line 22
MySQL Connection Error: (2054) The server requested authentication method unknown to the client
不知道这个报错是怎么产生的?
022018-10-18
相似问题