The premise is to install Python and the corresponding versions of Eclipse and MySQL. This article Python is 2.7,mysql 5.1Eclipse for 3.6.2
After downloading MySQLdb, the installation can be done directly. When you enable it in Eclipse, be aware of the problems you see below:
Article source http://www.chengxuyuans.com/Python/32723.html
Pydev is a good development tool, there is always a problem that makes me very headache, when using a third-party library, always prompts
Unresolved import, take import mysqldb as an example, in the Python command line input: Import MySQLdb confirm that the installation is successful, use Pydev or will be reported unresolved import.
You need to add support to Pydev:
Open: Windows->preferences->pydev->interpreter-python
Manually add mysqldb fields under forced Builtins to force compilation.
After apply, you can see that the MYSQLDB directory is added under Libraries. If not, then manually add the MYSQLDB directory below the libraries, forcing the compilation again.
However, when the wxpython2.9-win32-py27 is installed, the import WX uses the above method and still gives an error because the directory is python27\lib\site-packages\*wxpython2.9-msi*\wx when installing wx2.9 ; Just put WX over his superior directory and put it directly under the site-packages to solve the problem.
Installation of Python's mysqldb under Eclipse and related issues