"""
__author__ = 'chenguolin'
__date__=2014-02-17
"""
import MySQLdb
db = MySQLdb.connect(host="localhost", user="root", passwd="123456", db="test")
cursor = db.cursor()
cursor.execute("create table chenguolin(name char(8), age int)")
出现这个错误
D:\Python27\python.exe D:/scrapyProjects/testPython/p.py
Traceback (most recent call last):
File "D:/scrapyProjects/testPython/p.py", line 7, in
db = MySQLdb.connect(host="localhost", port=3306, user="root", passwd="123456", db="test")
File "D:\Python27\lib\site-packages\MySQLdb\__init__.py", line 81, in Connect
return Connection(*args, **kwargs)
File "D:\Python27\lib\site-packages\MySQLdb\connections.py