创建特定的root用户和主机名不起作用

时间:2016-11-29 17:44:58

标签: wordpress docker mariadb

使用wordpress / mariadb docker image我想使用以下默认设置在本地安装wordpress,

DB_NAME: mysite_wp
DB_USER: myuser
DB_PASSWORD: mypw
DB_HOST: localhost

使用docker-componse.yml文件

version: '2'

services:

  wordpress:
    image: wordpress
    ports:
      - 8080:80
    environment:
      WORDPRESS_DB_NAME: mysite_wp
      WORDPRESS_DB_USER: myuser
      WORDPRESS_DB_PASSWORD: mypw
    volumes:
      - ./src:/var/www/html

  mysql:
    image: mariadb
    environment:      
      MYSQL_ROOT_PASSWORD: mypw
      MYSQL_USER: myuser
      MYSQL_PASSWORD: mypw
    volumes:
      - ./db/mysite_wp.sql:/docker-entrypoint-initdb.d/mysite_wp.sql

我收到错误

wordpress_1  | MySQL Connection Error: (1045) Access denied for user 'myuser'@'172.18.0.3' (using password: YES)

0 个答案:

没有答案