Skip to content

MySQL with it's data in a host volume does not run on OSX #8

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

Closed
motin opened this issue May 17, 2016 · 2 comments
Closed

MySQL with it's data in a host volume does not run on OSX #8

motin opened this issue May 17, 2016 · 2 comments

Comments

@motin
Copy link

motin commented May 17, 2016

This is a know issue. The current workaround is to use a wrapper script around mysql's entrypoint

Without this wrapper script, mysql does not have write access to the host volume:

Attaching to piwik_db_1, piwik_app_1, piwik_web_1, piwik_cron_1
db_1          | Initializing database
db_1          | 2016-05-17T08:40:43.947123Z 0 [Warning] Setting lower_case_table_names=2 because file system for /var/lib/mysql/ is case insensitive
app_1         | [17-May-2016 08:39:56] NOTICE: fpm is running, pid 1
app_1         | [17-May-2016 08:39:56] NOTICE: ready to handle connections
db_1          | 2016-05-17T08:40:43.981323Z 0 [ERROR] InnoDB: Operating system error number 13 in a file operation.
db_1          | 2016-05-17T08:40:43.981347Z 0 [ERROR] InnoDB: The error means mysqld does not have the access rights to the directory.
db_1          | 2016-05-17T08:40:43.981351Z 0 [ERROR] InnoDB: Operating system error number 13 in a file operation.
db_1          | 2016-05-17T08:40:43.981353Z 0 [ERROR] InnoDB: The error means mysqld does not have the access rights to the directory.
db_1          | 2016-05-17T08:40:43.981355Z 0 [ERROR] InnoDB: Cannot open datafile './ibdata1'
db_1          | 2016-05-17T08:40:43.981358Z 0 [ERROR] InnoDB: Could not open or create the system tablespace. If you tried to add new data files to the system tablespace, and it failed here, you should now edit innodb_data_file_path in my.cnf back to what it was, and remove the new ibdata files InnoDB created in this failed attempt. InnoDB only wrote those files full of zeros, but did not yet use them in any way. But be careful: do not remove old data files which contain your precious data!
db_1          | 2016-05-17T08:40:43.981361Z 0 [ERROR] InnoDB: InnoDB Database creation was aborted with error Cannot open a file. You may need to delete the ibdata1 file before trying to start up again.
db_1          | 2016-05-17T08:40:44.583103Z 0 [ERROR] Plugin 'InnoDB' init function returned error.
db_1          | 2016-05-17T08:40:44.583129Z 0 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
db_1          | 2016-05-17T08:40:44.583135Z 0 [ERROR] Failed to initialize plugins.
db_1          | 2016-05-17T08:40:44.583137Z 0 [ERROR] Aborting
@pierreozoux
Copy link
Member

Did you try with the latest version of docker for MacOS?

@pierreozoux
Copy link
Member

Ok, I did some work to make it easier.

Can you pull the latest version of here and confirm this is working for you?
If not, please fell free to reopen :)

Thanks!

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

2 participants