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?


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.


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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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