我正在尝试使用 Docker Machine 创建本地开发设置。尝试创建 mysql 容器时,我一直遇到错误。这是我的设置。
码头机器版本 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
非常感谢任何帮助!谢谢。