visiblevc / wordpress-starter

A slightly less shitty wordpress development workflow
688 stars 167 forks source link

Cannot connect to MySQL #23

Closed markw01 closed 8 years ago

markw01 commented 8 years ago

I'm running this as per the instructions in the Getting Started section and I get an error when attempting to connect to the database (see below). I've tried a few different ways to connect to the database but can't see to (e.g. attempting to add a phpmyadmin container). Not sure if this is a local environment issue or not. Any pointers would be greatly appreciated.

Current versions of docker and docker-compose are: Docker: 1.10.3 Docker-Compose: 1.6.2

Wordpress Log

Wordpress setup!
=> Setup Database:
=====================================
  Database Host Address:  
  Database Port number:   
  Database Name:          wordpress
  Database Username:      root
=====================================
Cannot connect to Mysql

DB Log

2016-03-30T23:00:14.024021Z 0 [Note] mysqld: ready for connections.
Version: '5.7.10'  socket: '/var/run/mysqld/mysqld.sock'  port: 3306  MySQL Community Server (GPL

docker-compose.yml

version: '2'
services:
  data:
    image: busybox
    volumes:
      - /app
      - /var/lib/mysql
  wordpress:
    image: visiblevc/wordpress:latest
    links:
      - db
    ports:
      - 8080:80
      - 443:443
    volumes:
      - ./wp-content/uploads:/app/wp-content/uploads
      - ./yourplugin:/app/wp-content/plugins/yourplugin # Plugin development
      - ./yourtheme:/app/wp-content/themes/yourtheme   # Theme development
    environment:
      DB_NAME: wordpress
      DB_PASS: root # must match below
      PLUGINS: >-
        academic-bloggers-toolkit,
        co-authors-plus
      WP_DEBUG: true
  db:
    image: mysql:5.7
    ports:
      - 3306:3306
    volumes:
      - data:/var/lib/mysql
    environment:
      MYSQL_ROOT_PASSWORD: root
volumes:
  data: {}
karellm commented 8 years ago

@markw01 It looks like you are using the old image. Please make sure you pull the latest by running docker pull visiblevc/wordpress

markw01 commented 8 years ago

Thank you @karellm works a charm.