Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I've been testing deployment for a website with some virtual servers. I have most of my deployment steps done via kickstart file (package installation and user creation). However, for MySQL I have to:

  1. Run mysql_secure_installation (sets up root password, deletes anonymous users, disallows root login remotely, removes test databases) ./

  2. Then, create the website's databases and the database user.

I'm not sure if this is possible in kickstart---especially the prompts in mysql_secure_installation. Perhaps someone has some suggestions or examples?

share|improve this question
up vote 2 down vote accepted

i strongly recommend you look at using something like puppet for this higher-level configuration management. Kickstart is a great way to initially bring up a machine, but it is not sophisticated enough for more advanced configuration. Here's some docs on bootstrapping puppet with kickstart.

I just picked puppet as an example, Chef and cfengine are other find configuration management tools you can use to automate this process.

share|improve this answer

What you may wish to do is build a custom RPM package for the MySQL configuration you want and instruct kickstart to include this package. While there is a post-install portion of kickstart where you may run scripts and the like, the cleanest way would be via package.

Once you perform a 'mysql_secure_installation' you shouldn't have to again. Just use the config files and database that it created.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.