报错求解决
import MySQLdb
conn=MySQLdb.Connect(
host="127.0.0.1",
port=3306,
user="root",
password="root",
db="test",
charset="utf8"
)
cursor=conn.cursor()
print conn
print cursor
cursor.close()
conn.close()
File "D:\Java\myeclipse\workspace\IPython\com\Test\test_mysqldb.py", line 8, in <module>
charset="utf8"
File "c:\users\acer\appdata\local\temp\easy_install-1liftk\MySQL_python-1.2.5-py2.7-win32.egg.tmp\MySQLdb\__init__.py", line 81, in Connect
File "c:\users\acer\appdata\local\temp\easy_install-1liftk\MySQL_python-1.2.5-py2.7-win32.egg.tmp\MySQLdb\connections.py", line 193, in __init__
TypeError: 'password' is an invalid keyword argument for this function
报错啦