def Db_connect(self):
host=self.lineEdit_55.text()
user=self.lineEdit_59.text()
password=self.lineEdit_60.text()
db=self.lineEdit_61.text()
self.db=MySQLdb.connect(host='{}'.format(host), user='{}'.format(user), password='{}'.format(password), db='{}'.format(db))
self.cur = self.db.cursor()
我正在使用此代码配置用户扩展名,但对我而言不起作用。
MySQLdb.connect仅使用文本
self.db=MySQLdb.connect('{}'.format(host), '{}'.format(user), '{}'.format(password), '{}'.format(db))
喜欢
db = mdb.connect('localhost', 'root', '', 'pyqt5')
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句