mysql在os系统中安装此产品_docker容器中的mysql无法在os x上运行已安装的卷

在OS X上.

我试图通过boot2docker在docker容器中运行mysql,通过在主机上挂载volume / var / lib / MysqL,这样我就可以拥有持久的MysqL数据.

我计划将来使用仅数据容器,但是现在我正在尝试使用此选项.

我使用以下命令来运行容器:

docker run -v / Users / yash / summers / db:/ var / lib / MysqL -i -t’image name’

/ Users / yash / summers / db文件夹已经存在.

我正面临着这方面的问题.使用命令行,我能够访问目录,创建/删除新文件,但是当我运行时

服务MysqL启动,我收到以下错误:

150528 15:43:43 MysqLd_safe Starting MysqLd daemon with databases from /var/lib/MysqL

150528 15:43:43 [Warning] Using unique option prefix key_buffer instead of key_buffer_size is deprecated and will be removed in a future release. Please use the full name instead.

150528 15:43:43 [Note] /usr/sbin/MysqLd (MysqLd 5.5.43-0ubuntu0.14.04.1) starting as process 909 ...

150528 15:43:43 [Warning] Setting lower_case_table_names=2 because file system for /var/lib/MysqL/ is case insensitive

150528 15:43:43 [Warning] Using unique option prefix myisam-recover instead of myisam-recover-options is deprecated and will be removed in a future release. Please use the full name instead.150528 15:43:43 [Note] Plugin 'FEDERATED' is disabled.

/usr/sbin/MysqLd: Table 'MysqL.plugin' doesn't exist

150528 15:43:43 [ERROR] Can't open the MysqL.plugin table. Please run MysqL_upgrade to create it.

150528 15:43:43 InnoDB: The InnoDB memory heap is disabled

150528 15:43:43 InnoDB: Mutexes and rw_locks use GCC atomic builtins

150528 15:43:43 InnoDB: Compressed tables use zlib 1.2.8

150528 15:43:43 InnoDB: Using Linux native AIO

150528 15:43:43 InnoDB: Initializing buffer pool,size = 128.0M

150528 15:43:43 InnoDB: Completed initialization of buffer pool

150528 15:43:43 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.

InnoDB: File name ./ibdata1

InnoDB: File operation call: 'create'.

InnoDB: Cannot continue operation.

150528 15:43:44 MysqLd_safe MysqLd from pid file /var/run/MysqLd/MysqLd.pid ended

在过去的两天里,我试图解决这个问题,经历了很多页面,如this,this和this.

我无法解决我的问题.我想我无法完美地完成解决方案的建议.

根据我的理解,这些页面上列出了一些解决方法,包括更改uid和guid,但我认为它们没有得到很好的解释.

任何人都可以向我解释一个详细的解决方法.

更新1:我尝试使用仅数据容器,仍然面临同样的问题.

如果我不使用任何-v或–volumes-from选项,我可以运行一切正常,所以我认为在MysqL服务器中没有问题.

更新2:

用于创建仅数据容器的Dockerfile:

FROM ubuntu

RUN mkdir /var/lib/MysqL

VOLUME /var/lib/MysqL

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值