Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

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 am trying to install the python module "mysql" on Windows 7 with apache installed with AppServ (installation includes Apache, MySQL and PHP).

When I try to run the script of "python-mysql" I get error

serverKey = _winreg.OpenKey(_winreg.HKEY_LOCAL_MACHINE, options['registry_key'])
WindowsError: [Error 2] The system cannot find the file specified

The problem is that it can not find the registry of MySQL. So I opened regedit and looked under the default location (which was specified in - SOFTWARE\MySQL AB\MySQL Server 5.1 under HKEY_LOCAL_MACHINE.

However, I found that this location does not exist on my computer, and after searching a bit I found that under HKEY_USERS I do have "AppServ" under SOFTWARE, but MySQL Server is no where to be found!

Anyone had any experience with this issue and knows where I should point the config?

Thanks! Joel

share|improve this question

I added it manually and entered to String values for "Version" and "Location" (which I mapped to the bin folder of my MySQL installation path). Then you need to update site.cfg with the same key value you added those strings under in your registry. That should work barring other issues. Mine did not compile due to Python being compiled with Visual Studio... grrr. Hope this helps you though!

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.