Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unknown database, mysql database and user does not exist...? #1017

Closed
blomdahldaniel opened this issue Jun 13, 2017 · 4 comments
Closed

Unknown database, mysql database and user does not exist...? #1017

blomdahldaniel opened this issue Jun 13, 2017 · 4 comments

Comments

@blomdahldaniel
Copy link

Info:

  • Docker version ($ docker --version): Docker version 17.03.1-ce, build c6d412e
  • Laradock commit ($ git rev-parse HEAD): ab464d9
  • System info (Mac, PC, Linux): Mac
  • System info disto/version: macOS Sierra

Issue:

What seems to be going wrong?

It seems like there is no database nor user created for the mysql server.
The server is up and running but there are no database called "homestead" or what ever i add in my .env


Expected behavior:

What should be happening instead?

A database and a user should be created


Reproduce:

How might we be able to reproduce the error?

I follow basic getting started instrucitons, add laradock as an git submodule.
I run: docker-compose up -d nginx mysql


Relevant Code:

Laravel .env (changed DB_HOST to mysql

DB_CONNECTION=mysql
DB_HOST=mysql
DB_PORT=3306
DB_DATABASE=homestead
DB_USERNAME=homestead
DB_PASSWORD=secret

Laradock .env (default)

MYSQL_DATABASE=default
MYSQL_USER=default
MYSQL_PASSWORD=secret
MYSQL_PORT=3306
MYSQL_ROOT_PASSWORD=root
@ItaloBC
Copy link
Contributor

ItaloBC commented Jun 14, 2017

Can you post your Docker logs from the MySQL container?

@iredmedia
Copy link

I'm noticing that i can change this ONLY on the first run. Subsequent builds/runs fail to update with these new values, and retain the first run (regardless of removing volumes, containers, images).

@sakanaproductions
Copy link
Contributor

@ItaloBC @iredmedia I am having the same problem, it seems that one of the commits removed all the ENV commands from the mysql Dockerfile:

8820501644bdfd7b763ce135b6381590cc7ea212

sakanaproductions added a commit to sakanaproductions/laradock that referenced this issue Jul 1, 2017
environment variables were removed from
sakanaproductions added a commit to sakanaproductions/laradock that referenced this issue Jul 1, 2017
@iredmedia
Copy link

The issue in my case is that CHANGING after FIRST run, the DB still exists on the host OS and isn't modified as per #1028. Need to manually change info, or delete ~/.laradock/data/[mysql/postgres] etc.

in the .env file

### Data Path:
# For all storage systems.
DATA_SAVE_PATH=~/.laradock/data

Mahmoudz added a commit that referenced this issue Jul 3, 2017
 fixed issue #1017, added ENV variables back to Dockerfile and added …
@Mahmoudz Mahmoudz closed this as completed Jul 4, 2017
agebeyaw pushed a commit to agebeyaw/laradock that referenced this issue Aug 22, 2018
agebeyaw pushed a commit to agebeyaw/laradock that referenced this issue Aug 22, 2018
 fixed issue laradock#1017, added ENV variables back to Dockerfile and added …
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants