Skip to content
This repository has been archived by the owner on Oct 5, 2022. It is now read-only.

Cannot set root MySQL password value for root user #107

Open
cvilleger opened this issue Jun 22, 2018 · 2 comments
Open

Cannot set root MySQL password value for root user #107

cvilleger opened this issue Jun 22, 2018 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@cvilleger
Copy link

cvilleger commented Jun 22, 2018

Describe the bug
I cannot set for MySQL container the root user and root password because there is always a random root password for root user (MYSQL_RANDOM_ROOT_PASSWORD=yes). In that way, we cannot set root:root for development purpose.

To Reproduce
Create a new docker-compose.yml with only MySQL container.
For Connection part : Mysql User => root & Mysql Password => root

  • Result :
version: '3'
services:
    mysql:
        ports:
            - '3306:3306'
        volumes:
            - './docker/database:/var/lib/mysql'
        environment:
            - MYSQL_DATABASE=docker
            - MYSQL_USER=root
            - MYSQL_PASSWORD=root
            - MYSQL_RANDOM_ROOT_PASSWORD=yes
        image: 'mysql:5.7'

Expected behavior
When there is a root user, disable this :

- MYSQL_RANDOM_ROOT_PASSWORD=yes

Can you use MYSQL_ROOT_PASSWORD ?

Or simply display a error message for root user.

Screenshots
//

Desktop (please complete the following information):
//

Smartphone (please complete the following information):
//

Additional context
You can set a "forbidden acces" to set the root user or implement a way to do that.

@lbassin
Copy link
Member

lbassin commented Jun 22, 2018

Hi @cvilleger !
Thanks you for your feedback, @Mapsred suggested us to change this behaviour too

We didn't add an input for root password because we wanted to avoid using root user when it's not needed
But I agree that it doesn't have a big impact in a development context 😄

I'll make a PR in next days to fix this !

@lbassin lbassin self-assigned this Jun 22, 2018
@cvilleger
Copy link
Author

Thanks, I stay tune ^^
Great job by the way !

@saamuelantunes saamuelantunes added the bug Something isn't working label Jul 11, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants