I've seen responses for similar errors, but nothing that seems to address a solution that will work for me.
I've got a wordpress site that I've imported into docker following this tutorial. I've got everything down to the final part where I'm supposed to "docker compose up" and I'm getting the error listed in the subject line. Here is my .yml file:
version: "2"
services:
db:
image: mysql:5.6
volumes:
- db_data:/var/lib/mysql
restart: always
environment:
MYSQL_ROOT_PASSWORD: somewordpress
MYSQL_DATABASE: wordpress
MYSQL_USER: wordpress
MYSQL_PASSWORD: wordpress
wordpress:
depends_on:
- db
image: wordpress:latest
ports:
- "8000:80"
restart: always
environment:
WORDPRESS_DB_HOST: db:3306
WORDPRESS_DB_USER: wordpress
WORDPRESS_DB_PASSWORD: wordpress
volumes:
- ./public_html/wp-content/themes/oceanwp:/var/www/html/wp-content/themes/oceanwp
- ./public_html/wp-content/plugins:/var/www/html/wp-content/plugins
- ./public_html/wp-content/mu-plugins:/var/www/html/wp-content/mu-plugins
volumes:
- ./data:/docker-entrypoint-initdb.d