Skip to content

mysql:5.7 I cannot change datadir config #273

@joyarzun

Description

@joyarzun

My command:
docker run -v `pwd`/conf-mysql:/etc/mysql/conf.d -v `pwd`/volume-mysql:/var/lib/db-data -e MYSQL_ROOT_PASSWORD=my-secret-pw mysql

My custom config

$ cat conf-mysql/my.cnf
[mysqld]
datadir=/var/lib/db-data/

Then I expect data in volume-mysql but it's empty

In mysql:5.6 works fine

$ docker -v
Docker version 17.03.0-ce, build 60ccb22

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionUsability question, not directly related to an error with the image

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions