Docker Machine を使用してローカル開発セットアップを作成しようとしています。mysql コンテナーを作成しようとすると、エラーが発生し続けます。これが私のセットアップです。
docker-machine バージョン 0.3.0
Virtualbox バージョン 4.3.30
virtualbox のデフォルトの boot2docker vm、共有フォルダー /Users
でコンテナを作成する際にマウントするmysqlフォルダを作成しました/Users/tinnguyen/Development/Docker/containers/mysql
標準許可:
drwxr-xr-x 2 tinnguyen staff 68 Jul 25 16:45 mysql
以下は私のdockerコマンドです
docker run -d --name mysql -e MYSQL_ROOT_PASSWORD=root -v /Users/tinnguyen/Development/Docker/containers/mysql:/var/lib/mysql mysql
私がするときdocker logs mysql
、これは私が得たエラーです
docker logs mysql
Running mysql_install_db
2015-07-25 21:45:45 0 [Note] /usr/sbin/mysqld (mysqld 5.6.25) starting as process 29 ...
2015-07-25 21:45:45 29 [Note] InnoDB: Using atomics to ref count buffer pool pages
2015-07-25 21:45:45 29 [Note] InnoDB: The InnoDB memory heap is disabled
2015-07-25 21:45:45 29 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2015-07-25 21:45:45 29 [Note] InnoDB: Memory barrier is not used
2015-07-25 21:45:45 29 [Note] InnoDB: Compressed tables use zlib 1.2.7
2015-07-25 21:45:45 29 [Note] InnoDB: Using Linux native AIO
2015-07-25 21:45:45 29 [Note] InnoDB: Not using CPU crc32 instructions
2015-07-25 21:45:45 29 [Note] InnoDB: Initializing buffer pool, size = 128.0M
2015-07-25 21:45:45 29 [Note] InnoDB: Completed initialization of buffer pool
2015-07-25 21:45:45 7f8c9b939720 InnoDB: Operating system error number 13 in a file operation.
InnoDB: The error means mysqld does not have the access rights to
InnoDB: the directory.
2015-07-25 21:45:45 7f8c9b939720 InnoDB: Operating system error number 13 in a file operation.
InnoDB: The error means mysqld does not have the access rights to
InnoDB: the directory.
2015-07-25 21:45:45 29 [ERROR] InnoDB: Creating or opening ./ibdata1 failed!
2015-07-25 21:45:45 29 [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!
2015-07-25 21:45:45 29 [ERROR] Plugin 'InnoDB' init function returned error.
2015-07-25 21:45:45 29 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
2015-07-25 21:45:45 29 [ERROR] Unknown/unsupported storage engine: InnoDB
2015-07-25 21:45:45 29 [ERROR] Aborting
2015-07-25 21:45:45 29 [Note] Binlog end
2015-07-25 21:45:45 29 [Note] /usr/sbin/mysqld: Shutdown complete
本当に助けていただければ幸いです!ありがとう。