Install mysqldb need to install MySQL connector C on the computer, just need this connector just fine, do not need to put MySQL full.
In addition, you need to install VC for Python to provide compilation.
Download the script on the official website to install, unzip the package, CMD to the target directory, Python setup.py install.
General installation error, indicating that "config_win.h" could not be found
MYSQL.C: Fatal error C1083:cannot open include file: ' Config-win.h ': No such file or directory
Error:command ' "C:/Program files/microsoft Visual Studio 9.0/vc/bin/cl.exe" ' failed with exit status 2
If you are using MySQLdb 1.2.3, make the following changes: Open setup_windows.py, change mysql_root to MySQL Connector c directory
#serverKey = _winreg. Openkey (_winreg. hkey_local_machine,options[' Registry_key ')
#mysql_root, dummy = _winreg. QueryValueEx (Serverkey, ' location ')
Mysql_root = r "F:\devtools\MySQL\MySQL Connector C 6.0.2"
This problem if you use the latest MySQLdb 1.2.5, then modify the Site.cfg file in the directory
connector = C:\Program Files\MySQL\Connector C 6.0.2
If you can not install after the change, then remember to check the version of MySQL connector, the current official website provides the latest version of 6.1.6, note that this version is not config_win.h this file at all.
Therefore, please uninstall this version and then choose to install the historical version provided by the official website 6.0.2, should be able to install successfully.
Install mysqldb under Windows python