qt_mysql_driver icon indicating copy to clipboard operation
qt_mysql_driver copied to clipboard

6.3.0测试过了,不起作用,找不出原因,请帮忙确认是否有人用过,谢谢

Open jianggs opened this issue 3 years ago • 3 comments

6.3.0测试过了,不起作用,找不出原因,请帮忙确认是否有人用过,谢谢

jianggs avatar Jun 04 '22 11:06 jianggs

could you please provide more information, what exactly is not working?

thecodemonkey86 avatar Jun 04 '22 17:06 thecodemonkey86

这两个版本我都下载了,解压后我分别放到C:\Users\p50\AppData\Local\Programs\Python\Python39\Lib\site-packages\PySide6\plugins\sqldrivers下面进行了测试。可是均不成功。sqldirvers下面原来其他的驱动被我清除了。 mysql的版本: mysql> select version(); +-----------+ | version() | +-----------+ | 8.0.28    | +-----------+ 1 row in set (0.00 sec)

from PySide6.QtCore import qVersion; print('PySide6 Qt version', qVersion()) from PySide6.QtCore import QLibraryInfo print(QLibraryInfo.location(QLibraryInfo.PluginsPath)) print(QLibraryInfo.location(QLibraryInfo.LibrariesPath)) print(QLibraryInfo.location(QLibraryInfo.PrefixPath))

from PySide6.QtSql import QSqlDatabase print(QSqlDatabase.drivers()) db = QSqlDatabase.addDatabase('QMYSQL') print(db.lastError().text()) db.setHostName('localhost') db.setPort(3306) db.setDatabaseName('jgsquant') db.setUserName('jgsquant') db.setPassword('111111') if db.open(): print("连接成功") else: print("连接失败")

结果: C:\Users\p50\AppData\Local\Programs\Python\Python39\python.exe E:/jgsquant9/qsqlmysql.py PySide6 Qt version 6.3.0 C:/Users/p50/AppData/Local/Programs/Python/Python39/lib/site-packages/PySide6/plugins C:/Users/p50/AppData/Local/Programs/Python/Python39/lib/site-packages/PySide6/lib C:/Users/p50/AppData/Local/Programs/Python/Python39/lib/site-packages/PySide6/. ['QMARIADB', 'QMYSQL'] Driver not loaded Driver not loaded failed

------------------ 原始邮件 ------------------ 发件人: "thecodemonkey86/qt_mysql_driver" @.>; 发送时间: 2022年6月5日(星期天) 凌晨1:28 @.>; @.@.>; 主题: Re: [thecodemonkey86/qt_mysql_driver] 6.3.0测试过了,不起作用,找不出原因,请帮忙确认是否有人用过,谢谢 (Issue #24)

could you please provide more information, what exactly is not working?

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

jianggs avatar Oct 11 '22 07:10 jianggs

Please try as a quick fix copying the DLLs to the folder C:\Users\p50\AppData\Local\Programs\Python\Python39, like this: grafik

thecodemonkey86 avatar Oct 13 '22 09:10 thecodemonkey86