Here is a sample of how I use a definition and the databases cookbook to handle creating multiple databases/users:
From: “Eric Feldhusen” email@example.com
Sent: Tuesday, October 29, 2013 12:01pm
Subject: [chef] Re: Re: Help using chef community mysql cookbook for idempotent chef-client runs
I’m been working my way through using various chef community cookbooks, but I’m a little stuck on using the mysql cookbook.
I can install the MySQL service fine, but I’m having trouble with creating users and database(s) in a way that’s idempotent once the users and databases are there.
Also, is there a way to import a schema or an existing database dump file that I have copied to the client from the chef server?
Thanks for any suggestions.