db = pymysql.connect('localhost','root','123456','face01') TypeError: Connection.__init__() takes 1 positional argument but 5 were given错误意思
时间: 2023-06-08 12:05:15 浏览: 129
Python库 | dophon_db-1.2.8.post1-py3-none-any.whl
:连接不需要5个参数,只需要1个参数。正确的写法应该是:db = pymysql.connect(host='localhost',user='root',password='123456',database='face01')。
阅读全文