<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=utf-8"><meta name=Generator content="Microsoft Word 15 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:#954F72;
text-decoration:underline;}
.MsoChpDefault
{mso-style-type:export-only;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:3.0cm 2.0cm 3.0cm 2.0cm;}
div.WordSection1
{page:WordSection1;}
--></style></head><body lang=DA link=blue vlink="#954F72"><div class=WordSection1><p class=MsoNormal><span lang=EN-US>Problem solved by adding Mysql driver files libmysql.dll<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>libmysql.lib to the project source.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>I still can’t debug PYQT5.QTSQL, do I need to rebuild from the source? Why doesn’t installation from the wheel install with debug information or have I missed something?<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US>Kind regards<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>Gert</span></p><p class=MsoNormal><o:p> </o:p></p><div style='mso-element:para-border-div;border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm'><p class=MsoNormal style='border:none;padding:0cm'><b>From: </b><a href="mailto:gj@hd-doc.com">gj@hd-doc.com</a><br><b>Sent: </b>30. juli 2017 23:28<br><b>To: </b><a href="mailto:pyqt@riverbankcomputing.com">pyqt@riverbankcomputing.com</a><br><b>Subject: </b>Pyqt5.9 MySQL driver not loaded</p></div><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal><span lang=EN-US>Why is the MySQL driver not loaded when it’s available in C:\Python36\Lib\site-packages\PyQt5\Qt\plugins\sqldrivers\qsqlmysql.dll and print(db.isDriverAvailable('QMYSQL'))<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>Returns True.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>The setup is win10, Python 3.6.2 and installing the latest wheel Pyqt5.9.1 and SIP 4.19.3 by Pip 9.01. Hope someone can help me solving this time consuming problem finding and no solutions.<o:p></o:p></span></p><p style='margin-bottom:0cm;margin-bottom:.0001pt'><span lang=EN-US>T<b><u>he Code:</u></b></span></p><p class=MsoNormal><span lang=EN-US># coding=utf-8<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>from PyQt5.QtWidgets import QMessageBox<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>from PyQt5 import QtSql</span><o:p></o:p></p><p class=MsoNormal><span lang=EN-US>def createconnection():<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>db = QtSql.QSqlDatabase.addDatabase('MYSQL')<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>print(db.isDriverAvailable('QMYSQL'))<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>db.setHostName("192.168.1.225")<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>db.setPort(3306)<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>db.setDatabaseName("Database_dispo_4")<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>db.setUserName("T3")<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>db.setPassword("xxxx")<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>print(db.open())<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>print(db.lastError().text())<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>print(db.drivers()<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><b><u><span lang=EN-US>Consol output</span></u></b><span lang=EN-US><o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>C:\Python36\python.exe "C:\Program Files\JetBrains\PyCharm 2017.2\helpers\pydev\pydevd.py" --multiproc --qt-support=auto --client 127.0.0.1 --port 54371 --file C:/Users/Doc/Documents/Pyqt_SQL/src/Qtabwindow.py<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>pydev debugger: process 4020 is connecting<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US>Connected to pydev debugger (build 172.3317.103)<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>True<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>False<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>Driver not loaded Driver not loaded<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>['QSQLITE', 'QMYSQL', 'QMYSQL3', 'QODBC', 'QODBC3', 'QPSQL', 'QPSQL7']<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal>Kind regards<o:p></o:p></p><p class=MsoNormal>Gert Jorgensen<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal><o:p> </o:p></p></div></body></html>