wordpress 连接MySQL 被拒绝 什么原因
来源:6-3 Docker Compose的安装和基本使用
ThiefCat
2019-07-30
wordpress_1 | MySQL Connection Error: (2002) Connection refused
mysql_1 | 2019-07-30T08:56:05.787394Z 5 [System] [MY-013381] [Server] Server upgrade from ‘50700’ to ‘80017’ started.
mysql_1 | mbind: Operation not permitted
wordpress_1 |
wordpress_1 | MySQL Connection Error: (2002) Connection refused
wordpress_1 |
wordpress_1 | MySQL Connection Error: (2002) Connection refused
mysql_1 | 2019-07-30T08:56:13.832903Z 5 [System] [MY-013381] [Server] Server upgrade from ‘50700’ to ‘80017’ completed.
2回答
-
潇洒走一会啊
2020-02-26
version: '3.1' services: wordpress: image: wordpress restart: always ports: - 8080:80 environment: WORDPRESS_DB_HOST: db WORDPRESS_DB_USER: exampleuser WORDPRESS_DB_PASSWORD: examplepass WORDPRESS_DB_NAME: exampledb volumes: - wordpress:/var/www/html db: image: mysql:5.7 restart: always environment: MYSQL_DATABASE: exampledb MYSQL_USER: exampleuser MYSQL_PASSWORD: examplepass MYSQL_RANDOM_ROOT_PASSWORD: '1' volumes: - db:/var/lib/mysql volumes: wordpress: db:
我之前发现了和你相同的问题,我发现最新的docker hub上的最新的wordpress 的yml文件已经更改了,可能老师的授课视频之前是比较老的信息,现在很多参数必须要手动设定,例如WORDPRESS_DB_USER,WORDPRESS_DB_NAME,希望对你有帮助
20 -
麦兜搞IT
2019-07-31
请问您的mysql是5.7的版本么?另外能通过shell进入到mysql的console里么?
00
相似问题