When I write import MySQLdb in Eclipse using the PyDev plugin, I get an unresolved import. However, the program runs without error. I can add an annotation to get
import MySQLdb
If this code show error like this:
Unresolved import: MySQLdb
you should add D:\Python27\Lib\site-packages\MySQLdb to your sys.path.
D:\Python27\Lib\site-packages\MySQLdb
sys.path
D:\Python27\Lib\site-packages\MySQLdb is this location where you install MySQLdb in your computer disk. After this step, the error will disappear.
MySQLdb