Using wordpress/mariadb docker image I want to install wordpress locally with the following default settings,
DB_NAME: mysite_wp
DB_USER: myuser
DB_PASSWORD: mypw
DB_HOST: localhost
Using the docker-componse.yml file
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
I am getting error
wordpress_1 | MySQL Connection Error: (1045) Access denied for user 'myuser'@'172.18.0.3' (using password: YES)