Skip to content

mariadb fails - Host Directory as a Data Volume #9

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
tomdavidson opened this issue Jun 3, 2015 · 1 comment
Closed

mariadb fails - Host Directory as a Data Volume #9

tomdavidson opened this issue Jun 3, 2015 · 1 comment

Comments

@tomdavidson
Copy link

I am struggling with the proper use, when I include a data volume to a host directory mariadb fails. In my docker-compose.yml I have:

expressionengine:
  image: mariadb
  expose: 
   - "3306"
  volumes:
   - ../containers/expressionengine/var-lib-mysql/:/var/lib/mysql
  environment:
   - MYSQL_ROOT_PASSWORD=
   - MYSQL_DATABASE=expressionengine

But something is off:

Attaching to builddev_expressionengine_1
expressionengine_1 | Running mysql_install_db ...
expressionengine_1 | Installing MariaDB/MySQL system tables in '/var/lib/mysql/' ...
expressionengine_1 | 150603  5:15:20 [Note] /usr/sbin/mysqld (mysqld 10.0.19-MariaDB-1~wheezy-log) starting as process 38 ...
expressionengine_1 | 150603  5:15:20 [Note] InnoDB: Using mutexes to ref count buffer pool pages
expressionengine_1 | 150603  5:15:20 [Note] InnoDB: The InnoDB memory heap is disabled
expressionengine_1 | 150603  5:15:20 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
expressionengine_1 | 150603  5:15:20 [Note] InnoDB: Memory barrier is not used
expressionengine_1 | 150603  5:15:20 [Note] InnoDB: Compressed tables use zlib 1.2.7
expressionengine_1 | 150603  5:15:20 [Note] InnoDB: Using Linux native AIO
expressionengine_1 | 150603  5:15:20 [Note] InnoDB: Not using CPU crc32 instructions
expressionengine_1 | 150603  5:15:20 [Note] InnoDB: Initializing buffer pool, size = 256.0M
expressionengine_1 | 150603  5:15:20 [Note] InnoDB: Completed initialization of buffer pool
expressionengine_1 | 2015-06-03 05:15:20 7f2425ed9760  InnoDB: Operating system error number 13 in a file operation.
expressionengine_1 | InnoDB: The error means mysqld does not have the access rights to
expressionengine_1 | InnoDB: the directory.

Im sure its permissions given that the dir is written with my host user ownership:

bash-3.2$ cd containers/expressionengine/var-lib-mysql/
bash-3.2$ ls -l
drwxr-xr-x  2 tom  staff   68 Jun  3 10:16 mysql

Can I chown from docker-compose?

@tomdavidson
Copy link
Author

This is a problem with out boot2docker uses vboxsf and how the database service needs the UIDs to be the same. boot2docker/boot2docker#581 (comment)

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

1 participant