-
-
Notifications
You must be signed in to change notification settings - Fork 690
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
Access to attribute in "templates/default/my.cnf.erb" #281
Comments
Yep... with the v6 mysql cookbook, it's virtually impossible to set up proper client connections from other apps without knowing the (non-standard) socket, for example. |
I just added a quick patch to make the socket configurable. I'll add the rest of them in 6.1 Released as 6.0.12 On Fri, Jan 30, 2015 at 8:23 AM, Tom Wilson notifications@github.com
|
Can you please make sure you include tmpdir and include the apparmor configuration |
I agree with all these changes. We should be able to chose the data_dir, error_log, tmpdir, socket, and pid file. tmpdir in particular because it should be placed in memory and not on disk, which is what hard coding it to /tmp is doing. We should also be able to determine the location of the my.cnf file. |
The things you might reasonably want to do in my.cnf could be endless. One solution would be to change the hard coded cookbook attribute for my.cnf template in # Main configuration file
template "#{new_resource.name} :create #{etc_dir}/my.cnf" do
...
cookbook 'mysql'
...
)
action :create
end to something schematically like: # Main configuration file
template "#{new_resource.name} :create #{etc_dir}/my.cnf" do
...
cookbook new_resource.mycnf_template_cookbook if new_resource.mycnf_template_cookbook
...
)
action :create
end Default cookbook would still be (Of course doesn't provide a way to use a non-standard my.cnf location.) |
@flatrocks that looks like a good solution. I'm currenlty trying to figure out if I can rewrite some of this to be able to control the directory structures. I'm new to Ruby so it's been an adventure so far. If I can just get the directories how I want them I can write a wrapper to create my default my.cnf for my environment. |
These should all be tunable now as of 6.1.0... There are explicit knobs for the main my.cnf managed by a mysql_service, and an mysqld_options hash property as well. Enjoy! |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Feature request to provide access to attributes found in "templates/default/my.cnf.erb" such as "pid-file", "log-error" and "socket".
*This issue created as requested in issue #280.
The text was updated successfully, but these errors were encountered: