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

Mysql config .env failed to increase username and password #1863

Closed
t0rjan opened this issue Oct 31, 2018 · 5 comments
Closed

Mysql config .env failed to increase username and password #1863

t0rjan opened this issue Oct 31, 2018 · 5 comments
Labels

Comments

@t0rjan
Copy link

t0rjan commented Oct 31, 2018

Info:

  • Docker version ($ docker --version): Docker version 18.06.1-ce, build e68fc7a

  • Laradock commit ($ git rev-parse HEAD): 538b6aa

  • System info (Mac, PC, Linux): Mac

  • System info disto/version: 10.13.6 (17G65)

Issue:

If I didn't guess wrong, would it be https://raw.githubusercontent.com/docker-library/mysql/master/8.0/docker-entrypoint.sh Wrong?

Expected behavior:

Normally configured.env My username should be increased by a name called oooqo, and the password is wqwq, and a database is automatically created called test_db

MYSQL_VERSION=latest
MYSQL_DATABASE=test_db
MYSQL_USER=oooqo
MYSQL_PASSWORD=wqwq
MYSQL_PORT=3306
MYSQL_ROOT_PASSWORD=root
MYSQL_ENTRYPOINT_INITDB=./mysql/docker-entrypoint-initdb.d

Reproduce:

The user name and password of the database have not been modified successfully. It is still the default root username and root password.

Relevant Code:

###########################################################
###################### General Setup ######################
###########################################################

### Paths #################################################

# Point to the path of your applications code on your host
APP_CODE_PATH_HOST=/Users/akall/workspace

# Point to where the `APP_CODE_PATH_HOST` should be in the container. You may add flags to the path `:cached`, `:delegated`. When using Docker Sync add `:nocopy`
APP_CODE_PATH_CONTAINER=/var/www:cached

# Choose storage path on your machine. For all storage systems
DATA_PATH_HOST=~/.laradock/data

### Drivers ################################################

# All volumes driver
VOLUMES_DRIVER=local

# All Networks driver
NETWORKS_DRIVER=bridge

### Docker compose files ##################################

# Select which docker-compose files to include. If using docker-sync append `:docker-compose.sync.yml` at the end
COMPOSE_FILE=docker-compose.yml

# Change the separator from : to ; on Windows
COMPOSE_PATH_SEPARATOR=:

# Define the prefix of container names. This is useful if you have multiple projects that use laradock to have seperate containers per project.
COMPOSE_PROJECT_NAME=laradock

### PHP Version ###########################################

# Select a PHP version of the Workspace and PHP-FPM containers (Does not apply to HHVM). Accepted values: 7.2 - 7.1 - 7.0 - 5.6
PHP_VERSION=7.2

### Phalcon Version ###########################################

# Select a Phalcon version of the Workspace and PHP-FPM containers (Does not apply to HHVM). Accepted values: 3.4.0+
PHALCON_VERSION=3.4.1

### PHP Interpreter #######################################

# Select the PHP Interpreter. Accepted values: hhvm - php-fpm
PHP_INTERPRETER=php-fpm

### Docker Host IP ########################################

# Enter your Docker Host IP (will be appended to /etc/hosts). Default is `10.0.75.1`
DOCKER_HOST_IP=10.0.75.1


### MYSQL #################################################

MYSQL_VERSION=latest
MYSQL_DATABASE=test_db
MYSQL_USER=oooqo
MYSQL_PASSWORD=wqwq
MYSQL_PORT=3306
MYSQL_ROOT_PASSWORD=root
MYSQL_ENTRYPOINT_INITDB=./mysql/docker-entrypoint-initdb.d

### REDIS #################################################

REDIS_PORT=6379


### PHPREDISADMIN #########################################
REDIS_WEBUI_USERNAME=laradock
REDIS_WEBUI_PASSWORD=laradock
REDIS_WEBUI_CONNECT_HOST=redis
REDIS_WEBUI_CONNECT_PORT=6379
REDIS_WEBUI_PORT=9987

.....

@t0rjan t0rjan closed this as completed Oct 31, 2018
@t0rjan t0rjan reopened this Oct 31, 2018
@vv12131415
Copy link
Contributor

try to delete data from the DATA_PATH_HOST (the mysql relevant) and then do docker-compose build --no-cache mysql and see if it helps. Probably you have first created (build) the container with the default docs and then modified them

@t0rjan
Copy link
Author

t0rjan commented Nov 7, 2018

@vladyslavstartsev I tried this command to rebuild my mysql version and rebuild my laradock mysql, but it still doesn't work.

cd /Users/aaa/docker-mysql/8.0 
#cd /Users/aaa/docker-mysql/5.7

docker rmi mysql

cd /Users/aaa/laradock

docker-compose stop mysql && docker-compose stop mysql
docker rm laradock_mysql_1
docker rmi laradock_mysql
docker-compose build --no-cache mysql
docker-compose stop
docker-compose up -d nginx mysql redis adminer

@stale
Copy link

stale bot commented Feb 2, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the Stale label Feb 2, 2020
@stale
Copy link

stale bot commented Feb 23, 2020

Hi again 👋 we would like to inform you that this issue has been automatically closed 🔒 because it had not recent activity during the stale period. We really really appreciate your contributions, and looking forward for more in the future 🎈.

@stale stale bot closed this as completed Feb 23, 2020
@manu144x
Copy link

manu144x commented Mar 15, 2020

I have the exact same issue.

I deleted everything related to laradock, did the initial pull again, set up my .env variables and then built the container for the first time, yet it still uses only the default settings, it doesn't use the settings specified in the .env

The only way to fix it is probably to execute some SQL in the init .sql file.

I am running under Windows

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants