windows下python+django+mysql连接问题
新手,在连接数据库那里卡住了,我配置的环境已经能够import MySQLdb
然后输入con = MySQLdb.connection.connect(user='root', passwd = 'root' , db = 'test')
但是在建立连接的时候出现错误“type object ‘_mysql.connection’has not attribute ‘connect’”
MySQL Server 5.0,
MySQL Connector C 6.0.2,
django1.2
python2.6
MySQL_python-1.2.3c1-py2.6.egg-info
MySQL-python-1.2.3c1.win32-py2.6.exe还用了个这个文件
在线等答案,谢谢
[解决办法]
dir(MySQLdb) 你看下MySQLdb下提供给你的成员,再看看你自己下的就知道了