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

mysql error #7

Closed
mediafigaro opened this issue Aug 24, 2016 · 3 comments
Closed

mysql error #7

mediafigaro opened this issue Aug 24, 2016 · 3 comments

Comments

@mediafigaro
Copy link

Hello
with this latest version I have an error with mysql due to permissions issues on Mac, please any idea I've been checking this king of issue on forums but... ?

db_1 | 2016-08-24T15:52:03.578202Z 0 [Note] InnoDB: Initializing buffer pool, total size = 128M, instances = 1, chunk size = 128M
db_1 | 2016-08-24T15:52:03.595285Z 0 [Note] InnoDB: Completed initialization of buffer pool
db_1 | 2016-08-24T15:52:03.600991Z 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority().
db_1 | 2016-08-24T15:52:03.610361Z 0 [ERROR] InnoDB: The innodb_system data file 'ibdata1' must be writable
db_1 | 2016-08-24T15:52:03.610461Z 0 [ERROR] InnoDB: Plugin initialization aborted with error Generic error

@maxpou
Copy link
Owner

maxpou commented Aug 25, 2016

Hi @mediafigaro,
Could you try this solution:

services:
    db:
        image: mysql
        ports:
            - 3306:3306
        volumes:
            - "./.data/db:/var/lib/mysql"
        environment:
            - MYSQL_ROOT_PASSWORD: root
            - MYSQL_HOST=   # override from env file to be empty

See: docker-library/mysql#82 (comment)

@mediafigaro
Copy link
Author

Hello thanks I tried, but I still have this rights problem that I didn't have with your previous version with the symbolic link (ln -s ../project symfony)...

Attaching to dockersymfony_redis_1, dockersymfony_db_1, dockersymfony_php_1, dockersymfony_nginx_1, dockersymfony_elk_1
db_1 | 2016-08-25T08:20:32.791473Z 0 [Note] mysqld (mysqld 5.7.12) starting as process 1 ...
db_1 | 2016-08-25T08:20:32.809178Z 0 [Warning] Setting lower_case_table_names=2 because file system for /var/lib/mysql/ is case insensitive
db_1 | 2016-08-25T08:20:32.825275Z 0 [Note] InnoDB: PUNCH HOLE support available
db_1 | 2016-08-25T08:20:32.825553Z 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
db_1 | 2016-08-25T08:20:32.826201Z 0 [Note] InnoDB: Uses event mutexes
db_1 | 2016-08-25T08:20:32.826494Z 0 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier
db_1 | 2016-08-25T08:20:32.827036Z 0 [Note] InnoDB: Compressed tables use zlib 1.2.8
db_1 | 2016-08-25T08:20:32.827111Z 0 [Note] InnoDB: Using Linux native AIO
db_1 | 2016-08-25T08:20:32.828009Z 0 [Note] InnoDB: Number of pools: 1
db_1 | 2016-08-25T08:20:32.828205Z 0 [Note] InnoDB: Using CPU crc32 instructions
php_1 | [25-Aug-2016 10:20:32] NOTICE: fpm is running, pid 1
db_1 | 2016-08-25T08:20:32.847649Z 0 [Note] InnoDB: Initializing buffer pool, total size = 128M, instances = 1, chunk size = 128M
db_1 | 2016-08-25T08:20:32.879956Z 0 [Note] InnoDB: Completed initialization of buffer pool
php_1 | [25-Aug-2016 10:20:32] NOTICE: ready to handle connections
db_1 | 2016-08-25T08:20:32.886256Z 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority().
db_1 | 2016-08-25T08:20:32.935406Z 0 [ERROR] InnoDB: The innodb_system data file 'ibdata1' must be writable
db_1 | 2016-08-25T08:20:32.936339Z 0 [ERROR] InnoDB: The innodb_system data file 'ibdata1' must be writable
db_1 | 2016-08-25T08:20:32.937348Z 0 [ERROR] InnoDB: Plugin initialization aborted with error Generic error
db_1 | 2016-08-25T08:20:33.540282Z 0 [ERROR] Plugin 'InnoDB' init function returned error.
db_1 | 2016-08-25T08:20:33.540492Z 0 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
db_1 | 2016-08-25T08:20:33.541127Z 0 [ERROR] Failed to initialize plugins.
db_1 | 2016-08-25T08:20:33.541194Z 0 [ERROR] Aborting
db_1 |
db_1 | 2016-08-25T08:20:33.541814Z 0 [Note] Binlog end
db_1 | 2016-08-25T08:20:33.541953Z 0 [Note] Shutting down plugin 'MyISAM'
db_1 | 2016-08-25T08:20:33.542479Z 0 [Note] Shutting down plugin 'CSV'
db_1 | 2016-08-25T08:20:33.543074Z 0 [Note] mysqld: Shutdown complete

@maxpou
Copy link
Owner

maxpou commented Aug 25, 2016

Hi,
This lines indicate a permission problem:

db_1 | 2016-08-25T08:20:32.935406Z 0 [ERROR] InnoDB: The innodb_system data file 'ibdata1' must be writable
db_1 | 2016-08-25T08:20:32.936339Z 0 [ERROR] InnoDB: The innodb_system data file 'ibdata1' must be writable
db_1 | 2016-08-25T08:20:32.937348Z 0 [ERROR] InnoDB: Plugin initialization aborted with error Generic error

So, you have 2 solution :

  • if you want to keep your date, change .data folder permission

    sudo chmod -R 777 /path/to/.data
    
  • if you don't care about your datas (i.e. you use fixtures), remove your .data folder. This folder will be recreated on docker-compose up --force-recreate

    rm -rf /path/to/.data
    

BTW: this problem isn't related to this project itself. So if this problem persist, you should open an issue here: https://github.com/docker-library/mysql (I don't use Docker on Mac)

@maxpou maxpou closed this as completed Aug 31, 2016
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