<div dir="ltr"><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, 25 Oct 2020 at 14:49, Angelo Ballabio <<a href="mailto:angeloballabio@gmail.com">angeloballabio@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">hi<div><br></div><div>When I create a virtual environment and loaded PyQt5 into it, I realized that I cannot access MySQL database through <font color="#000000"><span style="background-color:rgb(255,255,255)"><span style="font-family:"Droid Sans Mono",monospace,monospace,"Droid Sans Fallback";font-size:11px;white-space:pre-wrap">QSqlDatabase</span><span style="font-family:"Droid Sans Mono",monospace,monospace,"Droid Sans Fallback";font-size:11px;white-space:pre-wrap">.</span><span style="font-family:"Droid Sans Mono",monospace,monospace,"Droid Sans Fallback";font-size:11px;white-space:pre-wrap">addDatabase</span><span style="font-family:"Droid Sans Mono",monospace,monospace,"Droid Sans Fallback";font-size:11px;white-space:pre-wrap">(</span><span style="font-family:"Droid Sans Mono",monospace,monospace,"Droid Sans Fallback";font-size:11px;white-space:pre-wrap">self</span><span style="font-family:"Droid Sans Mono",monospace,monospace,"Droid Sans Fallback";font-size:11px;white-space:pre-wrap">.</span><span style="font-family:"Droid Sans Mono",monospace,monospace,"Droid Sans Fallback";font-size:11px;white-space:pre-wrap">DBtype</span><span style="font-family:"Droid Sans Mono",monospace,monospace,"Droid Sans Fallback";font-size:11px;white-space:pre-wrap">)</span></span>,</font> checking I saw that the libsqlmysql.so driver is not present in the sqldrivers directory along with the others. I tried to search the internet for the file in question, and nothing on the <a href="http://qt.io" target="_blank">qt.io</a> website, and also on <a href="http://mysql.com" target="_blank">mysql.com</a> I can't find the file. if i use the one installed in my ubuntu 20.10 distribution it tells me that it is not compatible with the others. In a standard environment its does. Anyone have a solution to suggest?</div><div><br></div><div>Angelo</div></div>
</blockquote></div><br clear="all"><div style="font-family:tahoma,sans-serif" class="gmail_default">My understanding: as of the changes made in Oracle licensing, Qt can no longer distribute MySQL driver ready-built. You have to build it for yourself now.</div><div style="font-family:tahoma,sans-serif" class="gmail_default"><br></div><div style="font-family:tahoma,sans-serif" class="gmail_default">In the release distro of Ubuntu 20.04 there is a ready-built SQL driver. If you use that then no need to build.</div><div style="font-family:tahoma,sans-serif" class="gmail_default"><br></div><div style="font-family:tahoma,sans-serif" class="gmail_default">But if you take a later Qt you have to do the build. I don't know exactly how this relates to your version of PyQt5 or your virtual environment though. But I'm assuming there is a relationship?</div><div style="font-family:tahoma,sans-serif" class="gmail_default"><br></div><div style="font-family:tahoma,sans-serif" class="gmail_default">Hope this helps, I am interested to see the correct answer.</div><div style="font-family:tahoma,sans-serif" class="gmail_default"><br></div><br></div>