Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7834855
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T13:21:41+00:00 2026-06-02T13:21:41+00:00

I have several different servers used for different purposes. Everyone use mysql, but it

  • 0

I have several different servers used for different purposes. Everyone use mysql, but it should be configured a little bit different. => Different users, different databases.

I have a cookbook that installes mysql.

The question is, where should I put the scripts that create databases and users for mysql?

Sould it be:

  1. One script for every server(role) inside mysql cookbook? (This way different configs for 1 server will be in different cookbooks)
  2. Create a cookbook for every role, where I concatenate all the special configurations concerning this role. (This way different configs for 1 server will be in 1 particular place, but we will have 1 additional cookbook)

I personally think the #1 is better, as we join the different cookbooks under I role anyway.

Edit

It does not concern only databases. For example, I have some applications that require tomcats/jetties/other containers to be installed and configured differently (different ports, different modules enabled). Where different versions of settings.xml/jetty.xml etc. should be stored? In cookbook that

  1. installs tomcat or
  2. that installs other application, that requires tomcat?
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-02T13:21:44+00:00Added an answer on June 2, 2026 at 1:21 pm

    I would suggest including the Opscode database cookbook which provides a LWRP for managing databases and database users.

    Next, I would suggest creating one generic cookbook that leverages the LWRPs for databases and data bags. The data bags will hold your configuration information and will isolate your per server configuration differences.

    This will allow you to define your data for each server (users, databases, etc) and write one cookbook that can pull in the data and use it.

    Also, check out the encrypted data bags which allows you to store your passwords in an encrypted form on your Chef server.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Having to interact with several different email servers via IMAP (using javamail), I have
I have several entities which respresent different types of users who need to be
I have an app with several different tabs. The first of these tabs should
I have to create an mysql database to be used by several applications in
We have a piece of functionality that is used by several different applications (clients)
I have several different lists I want to call. They all have the same
I have several different content type nodes (videos, image galleries, stories...) that I would
I have several sites in different domains: example.com , example.org , mail.example.com and passport.example.org
In our infrastructure we have several nodes with different capabilities (in terms of services).
I have a large class, which I have divided into several different class extension

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.