-
-
Notifications
You must be signed in to change notification settings - Fork 59
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
6.3.0测试过了,不起作用,找不出原因,请帮忙确认是否有人用过,谢谢 #24
Comments
could you please provide more information, what exactly is not working? |
这两个版本我都下载了,解压后我分别放到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: ***@***.***>
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
6.3.0测试过了,不起作用,找不出原因,请帮忙确认是否有人用过,谢谢
The text was updated successfully, but these errors were encountered: