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 would like to use a standalone MySQL instance specifically for one of my programs.

I am thinking about a situation, where my program spawns the MySQL server as a child process to perform a very specific task and shuts the instance down afterwards. Ideally all files needed to run MySQL, including database files, are within the installation directory of my program.

My questions are:

  • Is this possible?
  • What are files needed to run such an instance?
  • Do I need a custom my.ini or can I control everything via parameters?
  • How do I do initial setup steps, like setting the root password, programatically?
share|improve this question
up vote 1 down vote accepted

You should look at the embedded mysql server library. It allows you to run a mysql server inside a client application:

But why not use something more suited to this sort of task like SQLite (

share|improve this answer
Cool, I'll check it out. Unfortunatelly my program has to exchange data with a legacy system running on mysql for one of the computational steps (hence the "performing a very specific task". ;-) ) – Tobias Hertkorn Aug 4 '10 at 21:06

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.