I have built two 64bit and two 32bit Windows distributions of the MySQLdb module for Python 2.6.x for both the stable 1.2.2 and the beta 1.2.3c1 versions.
It seems there were no 64bit distribution for Windows (at least for Python 2.6.x) in public and some of the 32bit ones I have tried had not been built with charset support for languages like greek or hebrew (not that I need them since the encoding I use is utf-8).
You can download the distributions from here:
MySQL-python-1.2.2.win32-py2.6.exe (1,022.8 KiB)
MySQL-python-1.2.2.win-amd64-py2.6.exe (1.0 MiB)
MySQL-python-1.2.3c1.win32-py2.6.exe (1,023.2 KiB)
MySQL-python-1.2.3c1.win-amd64-py2.6.exe (1.0 MiB)
UPDATE – Embedded binaries also available:
For the 64bit embedded versions get:
MySQL-python-embedded-1.2.2.win-amd64-py2.6.exe (261.0 KiB)
MySQL-python-embedded-1.2.3c1.win-amd64-py2.6.exe (261.4 KiB)
For the 32bit embedded versions get:
MySQL-python-embedded-1.2.2.win32-py2.6.exe (231.9 KiB)
MySQL-python-embedded-1.2.3c1.win32-py2.6.exe (232.3 KiB)
The embedded versions are linked against libmysqld.dll which must be present in the program directory (you will get a dll load fail if it isn’t there) and the share directory must also exist or else the program will crash in MySQLdb.server_init().
Have you had any luck building Windows distributions that use embedded MySQL? I have not been able to get this to work since the combination of MySQLdb 1.2.0 and MySQL 4.0.25. Any help you could provide would be greatly appreciated.
Never tried the embedded build until now.
The news are good, I just made two succesfull 64bit builds of the embedded server (libmysqld.dll) and finished some tests.
The build environment consisted of Windows Vista Business 64bit SP1, Python 2.6.2 x64, MySQL 5.1.33 x64, VS2008 Pro SP1 and MySQL-python 1.2.3c1 and 1.2.2.
I have updated my original post with these 64bit builds and this Saturday will add the 32bit versions.
Thanks for this, I was on the way to start a VM just for this. You saved me a lot of time
Thanks a lot for these! A real lifesaver, Python 2.6 + MySQL on Windows used to be a real pain until I saw this post.
Cheers!
Great – I wish I found this site half a day earlier.
Thanks a lot
Thank you for sharing your work!
[...] Read more from the original source: MySQL-python Windows 64bit and 32bit distributions [...]
Can you give some help on getting the installer to see the registry path for Python? I’ve checked, its there, but the installer can’t see it.
Thanks
Hi Ioannis, thank you for sharing this great work!
I was searching for an embedded MySQL and found your great blog. I really need your help.. Do you have a distribution for win32 & Python 2.5?
This was a real lifesaver. I have had the hardest time getting the library compiled on Windows for use with Python 2.6 and this worked fined. Thanks again.
Hey I noticed that I get a Warning when using the module:
Warning (from warnings module):
File “C:\Python26\lib\site-packages\MySQLdb\__init__.py”, line 34
from sets import ImmutableSet
DeprecationWarning: the sets module is deprecated
Not a big deal, just a heads up for anyone on python 2.6. I was getting really frustrated with mysql-python until I found this! Great work.
спасибо мужик
Thanks so much, this has really helped me out.
Thanks a lot
Great job
If you’re on Windows (I’m using Windows 7 64-bit) and get the error that python version 2.6 is not found in the registry (might just be a problem with ActiveState), just manually add the registry keys so this exists:
HKLM\Software\Python\PythonCore\2.6\InstallPath
Then change the value of (Default) under that key to “C:\python26″ or your own path\to\python2.6
Installation of the above files should work then.
Thank you, David, for your comments on the 64-bit issue, it has really been helpful.
Hello,
I’m trying to get Py 2.6 and Mysql running on a windows 7 (64-Bit) system.
It works fine – thanx a lot!
The only problem I experienced is the following:
The installer stops with windows exception (I don’t know how to call it) if I don’t use the predefined path. (I tried the “german” path c:\programme\python26
Any ideas?
Thomas
I am running under vista 64, I’ve installed mysql but running my python file i get this errormessage:
from MySQLdb import connect
File “C:\Python26\lib\site-packages\MySQLdb\__init__.py”, line 19, in
import _mysql
ImportError: DLL load failed: %1 is geen geldige Win32-toepassing.
Any suggestions how to avoid this? Thanks
thanks a lot with tears
you are so great!!
Can you run MySQL-python-1.2.3c1.win32-py2.6.exe and MySQL-python-embedded-1.2.3c1.win32-py2.6.exe side by side?
if so how?
I tried and it didn’t seem to work.
OMG I LOVE YOU. THANK YOU SO MUCH.
I just wasted four hours of my life trying to get Visual C and mingw and distutils and Python to all play nicely on 64bit Vista. And then I spent all of thirty seconds clicking next and install in your application.
Thanks again!
Thanks for providing these. Saved me much time with a Windows installation of a Django web site.
When i try using the “MySQL-python-1.2.2.win-amd64-py2.6.exe”, the installer freezes during setup and I don’t know why. I am using Python 2.6.4 64-bit on windows 7 64-bit.
Thank you.
God bless you for this builds. There are good people on this world
Thanks for the build and the tip for windows 7 64 bit. I am also trying to run Django but keep getting “Error loading MySQLdb module: DLL load failed with error code 193″. I have tried to put the DLL file in the python directory and my project directory and the mysqlDB package directory but no lucky. Could you suggest me what does “program directory” exactly mean?
Thanks in advance.