Chef use of MySQL installation as a recipe


Staff member
I am looking at Chef-repo and I have a nice setup so far where I have a HA Proxy as a load blanancer connected to two wordpress servers, What I am looking to do is setup a database with a data bag in the following format passwords, passwords is abc123.

I have this data bag encrypted with a key and everything looks hunky dorey!

Now I have the latest mysql cookbook from the supermarket but I am unable to find a place to set the password during the recipe setup.

I was looking at:

Then, in a recipe:

mysql_service 'default' do
  port '3306'
  version '5.5'
  initial_root_password 'change me'
  action [:create, :start]

mysql_config 'default' do
  source 'mysite.cnf.erb'
  notifies :restart, 'mysql_service[default]'
  action :create

Source: <a href="" rel="nofollow"></a>

But I am very unsure were this recipe is meant to go.

Any help would be grateful.