equ0rg
Last Updated: February 25, 2016
·
1.662K
· onemoretime

Install MySQL-python-1.2.3 with python2.7, mysql5.6 on seven

With seven, VStudio

Reference : http://fuyun.org/2009/12/install-mysql-for-python-on-windows/

  1. Install Python2.7
  2. Install Mysql5.6
  3. In MySQL\MySQL Server 5.6\lib, create opt directory and copy in this directory MySQL\MySQL Server 5.6\lib\mysqlclient.lib
  4. In MySQL\MySQL Server 5.6\include : copy my_config.h to config-win.h
  5. In MySQL-python-1.2.3\site.cfg, modify as following : registry_key = SOFTWARE\MySQL AB\MySQL Server 5.6
  6. In MySQL-python-1.2.3\setupwin.py, modify as following (line 7): *serverKey = _winreg.OpenKey(winreg.HKEYCURRENTUSER, options['registrykey'])* instead of *HKEYLOCAL_MACHINE*
  7. Run regedit et add a REGSZ key in HKEYCURRENT_USER\Software\MySQL AB\MySQL Server 5.6 : Name : Location Value : <your install path>\MySQL\MySQL Server 5.6

Now in MySQL-python-1.2.3 directory, you're ready to run python setup.py build, followed by a python setup.py install.