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

mysqld: Can't create/write to file '/var/lib/mysql/is_writable' (Errcode: 13 - Permission denied) #19

Closed
aarongeiser opened this issue Oct 5, 2016 · 5 comments

Comments

@aarongeiser
Copy link

I am unable to get the MySQL container to work - the MySQL container produces the above error.

@maxpou
Copy link
Owner

maxpou commented Oct 5, 2016

Hi @aarongeiser,

Sorry man, I don't understand your problem.
What are you trying to do and why?

@aarongeiser
Copy link
Author

aarongeiser commented Oct 5, 2016

Hi @maxpou -

I was simply following your instructions to run and use the docker-compose that you have included in this repository.

I discovered that - because I am on a mac - I had to add the following to the MySQL build:

RUN usermod -u 1000 mysql

and the following to the PHP and Nginx builds:

RUN usermod -u 1000 www-data

This alleviated the host permission issues I was getting. Including the error that I posted in this issue.

@davidbonachera
Copy link

davidbonachera commented Apr 11, 2017

Same, i had to create a build for :
macOS Sierra 10.12.3,
Docker Edge 17.04.0-ce,
Docker Compose 1.12

./mysql/Dockerfile :

FROM mysql

RUN usermod -u 1000 mysql

Add to docker-compose.yml :

services:
    db:
        build: mysql
        volumes:
            - "./.data/api_db:/var/lib/mysql"

@Airone2000
Copy link

Same issue there, on macOS High Sierra.

Working solution :

  db:
    volumes:
      - "db-data:/var/lib/mysql:rw"

@erlangparasu
Copy link

Thanks @davidbonachera @Maels1991

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