gpt4 book ai didi

mysql - Vagrant : chef_solo | how i can change log path from mysql server and mongodb?

转载 作者:行者123 更新时间:2023-11-30 23:11:04 24 4
gpt4 key购买 nike

我正在与 vagrant 和 chef 一起工作。就一切而言,只有当我在 vagrant 文件中使用 mysql 的 Logpath 和 mongodb 更改时,才会出现错误。

如果这里有人有提示并且可以帮助我,我会很高兴。

在 Vagrantfile 中我已经声明了......

:mysql => {
:server_root_password => 'password',
:server_debian_password => 'password',
:server_repl_password => 'password',
:allow_remote_root => true,
:log_dir => "/vagrant/www/logs/mysql",
:tunable => {
:log_slow_queries => "/vagrant/www/logs/mysql/slow.log",
:log_error => true,
:log_warnings => true
}
},
:mongodb => {
:logpath => "/vagrant/www/logs/mongodb"
},



================================================================================
Error executing action `create` on resource 'directory[/vagrant/www/logs/mysql]'
================================================================================

Errno::EPERM
------------
Operation not permitted - /vagrant/www/logs/mysql

Resource Declaration:
---------------------
# In /tmp/vagrant-chef/chef-solo-1/cookbooks/mysql/recipes/server.rb

117: directory path do
118: owner 'mysql' unless platform?('windows')
119: group 'mysql' unless platform?('windows')
120: action :create
121: recursive true
122: end
123: end

Compiled Resource:
------------------
# Declared in /tmp/vagrant-chef/chef-solo-1/cookbooks/mysql/recipes/server.rb:117:in `block in from_file'

directory("/vagrant/www/logs/mysql") do
provider Chef::Provider::Directory
action [:create]
retries 0
retry_delay 2
path "/vagrant/www/logs/mysql"
recursive true
cookbook_name :mysql
recipe_name "server"
owner "mysql"
group "mysql"
mode 493
end

[2013-10-31T01:03:09-07:00] DEBUG: Re-raising exception: Errno::EPERM - directory[/vagrant/www/logs/mysql] (mysql::server line 117) had an error: Errno::EPERM: Operation not permitted - /vagrant/www/logs/mysql

最佳答案

这一行是关键问题:Operation not permitted -/vagrant/www/logs/mysql

表示不允许用户在此路径下创建目录。请检查用户 mysql 是否有权访问目录 /vagrant/www/logs。也许你需要在 /vagrant

上使用 +x

关于mysql - Vagrant : chef_solo | how i can change log path from mysql server and mongodb?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19701301/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com