Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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
add comment

1 Answer

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:

http://dev.mysql.com/doc/refman/5.1/en/libmysqld.html

But why not use something more suited to this sort of task like SQLite (http://www.sqlite.org/)

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
add comment

Your Answer

 
discard

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.