1. Download mysql-Python plugin from the Operating System
2. Double-click to install mysqldb.
3. Import mysqldb. AppearsFile "C:/python26/lib/Site-packages/mysqldb/_ init _. py", line 19, in <module>
Importerror: DLL load failed: the specified module cannot be found.Is missing two DLL files: libguide40.dll and libmmd. dll. Download the package and copy it to Windows/system32 or python26/lib/Site-packages.
4. Import mysqldb. AgainSYS: 1: deprecationwarning: The sets module is deprecatedError, search again, because 2.6 does not know the sets module, but the set built-in function has been added. Locate _ init _. py in the mysqldb folder and comment outFrom Sets Import immutableset
Class dbapiset (immutableset ):AddClass dbapiset (frozenset ):Find converters. py and comment out from sets import baseset and set. Then, set the values of rows 45th and 129 to set.
5. Import mysqldb
Conn = mysqldb. Connect (host = "localhost", user = "root", passwd = "root", DB = "test ")
Connection successful MySQL use API: http://mysql-python.sourceforge.net/MySQLdb.html
Attachment: related installation files and DLL after finishing download http://download.csdn.net/source/3080072